- 22 5月, 2018 26 次提交
-
-
由 bors 提交于
Misc changes related to Miri allocations This builds on top of https://github.com/rust-lang/rust/pull/50249 r? @oli-obk
-
由 bors 提交于
Filter global bounds from ParamEnv again. This PR adds back the filtering of global bounds from ParamEnv as a temporary solution for #50825. <details> Long term, the fix seems like it should be changing the priority in `candidate_should_be_dropped_in_favor_of` so that (global) where clauses aren't considered as highly. https://github.com/rust-lang/rust/blob/a722296b6ec17fecd3f16a7d3f9232b83e5de800/src/librustc/traits/select.rs#L2017-L2022 </details> r? @nikomatsakis
-
由 bors 提交于
rustc: Fix joint-ness of stringified token-streams This commit fixes `StringReader`'s parsing of tokens which have been stringified through procedural macros. Whether or not a token tree is joint is defined by span information, but when working with procedural macros these spans are often dummy and/or overridden which means that they end up considering all operators joint if they can! The fix here is to track the raw source span as opposed to the overridden span. With this information we can more accurately classify `Punct` structs as either joint or not. Closes #50700
-
由 John Kåre Alsaker 提交于
-
由 John Kåre Alsaker 提交于
-
由 John Kåre Alsaker 提交于
-
由 bors 提交于
Stabilize suggestion applicability field in json output cc @killercup r? @nrc
-
由 bors 提交于
Escape combining characters in char::Debug Although combining characters are technically printable, they make little sense to print on their own with `Debug`: it'd be better to escape them like non-printable characters. This is a breaking change, but I imagine the fact `escape_debug` is rare and almost certainly primarily used for debugging that this is an acceptable change. Resolves #41922. r? @alexcrichton cc @clarcharr
-
由 bors 提交于
Fix issue #50811 (`NaN > NaN` was true). Fix #50811 Make sure the float comparison output is consistent with the expected behavior when NaN is involved. ---- Note: This PR is a **BREAKING CHANGE**. If you have used `>` or `>=` to compare floats, and make the result as the length of a fixed array type, like: ```rust use std::f64::NAN; let x: [u8; (NAN > NAN) as usize] = [1]; ``` then the code will no longer compile. Previously, all float comparison involving NaN will just return "Greater", i.e. `NAN > NAN` would wrongly return `true` during const evaluation. If you need to retain the old behavior (why), you may replace `a > b` with `a != a || b != b || a > b`.
-
由 varkor 提交于
-
由 varkor 提交于
-
由 varkor 提交于
-
由 varkor 提交于
-
由 varkor 提交于
-
由 varkor 提交于
-
由 varkor 提交于
-
由 varkor 提交于
-
由 varkor 提交于
-
由 varkor 提交于
-
由 varkor 提交于
-
由 varkor 提交于
-
由 varkor 提交于
-
由 Manish Goregaokar 提交于
-
由 Manish Goregaokar 提交于
-
由 Manish Goregaokar 提交于
-
由 bors 提交于
Quick refactoring around Substs & friends. r? @nikomatsakis
-
- 21 5月, 2018 14 次提交
-
-
由 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 提交于
-