- 22 5月, 2018 3 次提交
-
-
由 John Kåre Alsaker 提交于
-
由 John Kåre Alsaker 提交于
-
由 bors 提交于
Quick refactoring around Substs & friends. r? @nikomatsakis
-
- 21 5月, 2018 16 次提交
-
-
由 bors 提交于
stabilize opt-level={s,z} closes #35784 closes #47651 ### Rationale Since the lastest LLVM upgrade rustc / LLVM does more agressive loop unrolling. This results in increased binary size of embedded / no_std programs: a hundreds of bytes increase, or about a 7x increase, in the case of the smallest Cortex-M binary cf. #49260. As we are shooting for embedded Rust on stable it would be great to also provide a way to optimize for size (which is pretty important for embedded applications that target resource constrained devices) on stable. Also this has been baking in nightly for a long time. r? @alexcrichton which team has to sign off this?
-
由 Eduard-Mihai Burtescu 提交于
-
由 Eduard-Mihai Burtescu 提交于
-
由 Eduard-Mihai Burtescu 提交于
-
由 Eduard-Mihai Burtescu 提交于
-
由 Eduard-Mihai Burtescu 提交于
-
由 Eduard-Mihai Burtescu 提交于
-
由 Eduard-Mihai Burtescu 提交于
-
由 bors 提交于
UnsafeCell doc typos and minor flow improvements r? @QuietMisdreavus
-
由 bors 提交于
Switch Vec from doubling size on growth to using RawVec's reserve On growth, Vec does not require to exactly double its size for correctness, like, for example, VecDeque does. Using reserve instead better expresses this intent. It also allows to reuse Excess capacity on growth and for better growth-policies to be provided by RawVec. r? @sfackler
-
由 bors 提交于
lexer: Fix span override for the first token in a string Previously due to peculiarities of `StringReader` construction something like `"a b c d".parse::<TokenStream>()` gave you one non-overridden span for `a` and then three correctly overridden spans for `b`, `c` and `d`. Now all the spans are overridden.
-
由 bors 提交于
Find the largest niche when computing layouts Otherwise we end up with `Option<Option<(&(), bool)>>` unnecessarily large.
-
由 bors 提交于
rustc: introduce {ast,hir}::AnonConst to consolidate so-called "embedded constants". Previously, constants in array lengths and enum variant discriminants were "merely an expression", and had no separate ID for, e.g. type-checking or const-eval, instead reusing the expression's. That complicated code working with bodies, because such constants were the only special case where the "owner" of the body wasn't the HIR parent, but rather the same node as the body itself. Also, if the body happened to be a closure, we had no way to allocate a `DefId` for both the constant *and* the closure, leading to *several* bugs (mostly ICEs where type errors were expected). This PR rectifies the situation by adding another (`{ast,hir}::AnonConst`) node around every such constant. Also, const generics are expected to rely on the new `AnonConst` nodes, as well (cc @varkor). * fixes #48838 * fixes #50600 * fixes #50688 * fixes #50689 * obsoletes #50623 r? @nikomatsakis
-
由 Vadim Petrochenkov 提交于
-
由 bors 提交于
Add implementation of Extend for () This is useful in some generic code which wants to collect iterators of items into a result.
-
由 bors 提交于
Fix incorrect statement about return value for Iterator::zip. Fixes https://github.com/rust-lang/rust/issues/50225.
-
- 20 5月, 2018 20 次提交
-
-
由 bors 提交于
resolve: Don't add unnecessary import candidates for `prefix::{self}` imports Fixes https://github.com/rust-lang/rust/issues/50725
-
由 bors 提交于
Speed up the macro parser These three commits reduce the number of allocations done by the macro parser, in some cases dramatically. For example, for a clean check builds of html5ever, the number of allocations is reduced by 40%. Here are the rustc-benchmarks that are sped up by at least 1%. ``` html5ever-check avg: -6.6% min: -10.3% max: -4.1% html5ever avg: -5.2% min: -9.5% max: -2.8% html5ever-opt avg: -4.3% min: -9.3% max: -1.6% crates.io-check avg: -1.8% min: -2.9% max: -0.6% crates.io-opt avg: -1.0% min: -2.2% max: -0.1% crates.io avg: -1.1% min: -2.2% max: -0.2% ```
-
由 bors 提交于
rustc: Disallow modules and macros in expansions This commit feature gates generating modules and macro definitions in procedural macro expansions. Custom derive is exempt from this check as it would be a large retroactive breaking change (#50587). It's hoped that we can hopefully stem the bleeding to figure out a better solution here before opening up the floodgates. The restriction here is specifically targeted at surprising hygiene results [1] that result in non-"copy/paste" behavior. Hygiene and procedural macros is intended to be avoided as much as possible for Macros 1.2 by saying everything is "as if you copy/pasted the code", but modules and macros are sort of weird exceptions to this rule that aren't fully fleshed out. [1]: https://github.com/rust-lang/rust/issues/50504#issuecomment-387734625 cc #50504
-
由 bors 提交于
Add target for Big-endian ARM Cortex-R4F/R5F MCUs The ARM Real-Time (‘R’) profile provides high-performing processors for safety-critical environments. Cortex-R has ARM, Thumb instruction whereas Cortex-M makes use of Thumb only. CI/Dockerfile is intentionally in the `disabled` folder.
-
由 Jake Goulding 提交于
-
由 bors 提交于
Fix an ICE when attempting to transmute an uninhabited type Fixes https://github.com/rust-lang/rust/issues/50570.
-
由 Vadim Petrochenkov 提交于
-
由 bors 提交于
Rollup of 8 pull requests Successful merges: - #50531 (Cleanup uses of TypeIdHasher and replace them with StableHasher) - #50819 (Fix potential divide by zero) - #50827 (Update LLVM to 56c931901cfb85cd6f7ed44c7d7520a8de1edf97) - #50829 (CheckLoopVisitor: also visit break expressions) - #50854 (in which the unused shorthand field pattern debacle/saga continues) - #50858 (Reorder description for snippets in rustdoc documentation) - #50883 (Fix warning when building stage0 libcore) - #50889 (Update clippy) Failed merges:
-
由 kennytm 提交于
Update clippy # Conflicts: # src/Cargo.lock
-
由 kennytm 提交于
Fix potential divide by zero This should fix #50761 I had trouble reproducing with the provided code, but looking at the stack trace would indicate that this code is the likely cause. I made a number of assumptions here, because I don't have enough context on how the register size is set: 1. I assumed `rest.unit.size.bytes()` can be 0, and it's ok if it's set to 0 before this function is called 2. I assumed that if `rest.unit.size.bytes()` is 0, that we want `rest_count` to also be 0.
-
由 kennytm 提交于
Fix warning when building stage0 libcore When building stage0 a warning will be triggered when compiling libcore due to `align_to_offsets` not being used.
-
由 kennytm 提交于
Reorder description for snippets in rustdoc documentation The example code snippets for the `no_run` and `compile_fail` attributes in the rustdoc documentation were followed by the description for the wrong attribute. This patch reorders the descriptions to match the code snippets.
-
由 kennytm 提交于
Rollup merge of #50854 - zackmdavis:and_the_case_of_the_unused_field_pattern_3_straight_to_video, r=estebank in which the unused shorthand field pattern debacle/saga continues In e4b1a797 (#47922), we corrected erroneous suggestions for unused shorthand field pattern bindings, suggesting `field: _` where the previous suggestion of `_field` wouldn't even have compiled (#47390). Soon, it was revealed that this was insufficient (#50303), and the fix was extended to references, slices, &c. (#50327) But even this proved inadequate, as the erroneous suggestions were still being issued for patterns in local (`let`) bindings (#50804). Here, we yank the shorthand-detection and variable/node registration code into a new common function that can be called while visiting both match arms and `let` bindings. Resolves #50804. r? @estebank
-
由 kennytm 提交于
CheckLoopVisitor: also visit break expressions Fixes #50802
-
由 kennytm 提交于
Update LLVM to 56c931901cfb85cd6f7ed44c7d7520a8de1edf97 This brings in https://github.com/rust-lang/llvm/pull/115, which fixes https://github.com/rust-lang/rust/issues/49873.
-
由 bors 提交于
Prevent main from having a where clause. Closes #50714 Should this have a crater run? cc #48557, #48214 r? @nikomatsakis
-
由 cjkenn 提交于
-
由 Eduard-Mihai Burtescu 提交于
-
- 19 5月, 2018 1 次提交
-
-
由 cjkenn 提交于
remove semicolon -_- Add rem_bytes to conditional to avoid error when performing mod by 0 Add test file to confirm compilation passes. Ensure we don't divide or mod by zero in llvm_type. Include test file from issue.
-