-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 9 pull requests #36491
Rollup of 9 pull requests #36491
Commits on Sep 10, 2016
-
Configuration menu - View commit details
-
Copy full SHA for 2a2c9d3 - Browse repository at this point
Copy the full SHA 2a2c9d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 62cb751 - Browse repository at this point
Copy the full SHA 62cb751View commit details
Commits on Sep 11, 2016
-
Configuration menu - View commit details
-
Copy full SHA for 6b99e01 - Browse repository at this point
Copy the full SHA 6b99e01View commit details
Commits on Sep 13, 2016
-
fix "X is not a member of trait Y" span labels
The span labels for associated types and consts were hardcoded to `Foo` rather than substituting the name of the trait. This also normalizes the wording for associated methods', traits', and consts' span labels. Fixes rust-lang#36428.
Configuration menu - View commit details
-
Copy full SHA for 0a62676 - Browse repository at this point
Copy the full SHA 0a62676View commit details -
Configuration menu - View commit details
-
Copy full SHA for 50f94f6 - Browse repository at this point
Copy the full SHA 50f94f6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 60440b2 - Browse repository at this point
Copy the full SHA 60440b2View commit details -
Configuration menu - View commit details
-
Copy full SHA for a9821e1 - Browse repository at this point
Copy the full SHA a9821e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 20b43b2 - Browse repository at this point
Copy the full SHA 20b43b2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 72a6369 - Browse repository at this point
Copy the full SHA 72a6369View commit details -
Perform node id assignment and
macros_at_scope
construction duringthe `InvocationCollector` and `PlaceholderExpander` folds.
Configuration menu - View commit details
-
Copy full SHA for c86c8d4 - Browse repository at this point
Copy the full SHA c86c8d4View commit details -
Configuration menu - View commit details
-
Copy full SHA for f3c2dca - Browse repository at this point
Copy the full SHA f3c2dcaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 78c0039 - Browse repository at this point
Copy the full SHA 78c0039View commit details -
Differentiate between monotonic and non-monotonic expansion and
only assign node ids during monotonic expansion.
Configuration menu - View commit details
-
Copy full SHA for b54e1e3 - Browse repository at this point
Copy the full SHA b54e1e3View commit details -
Make sure that projection bounds in ty::TraitObject are sorted in a w…
…ay that is stable across compilation sessions and crate boundaries.
Configuration menu - View commit details
-
Copy full SHA for 5a881e9 - Browse repository at this point
Copy the full SHA 5a881e9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5c923f0 - Browse repository at this point
Copy the full SHA 5c923f0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 94d7501 - Browse repository at this point
Copy the full SHA 94d7501View commit details -
Configuration menu - View commit details
-
Copy full SHA for 75a0dd0 - Browse repository at this point
Copy the full SHA 75a0dd0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 869d144 - Browse repository at this point
Copy the full SHA 869d144View commit details -
Configuration menu - View commit details
-
Copy full SHA for 377c3e1 - Browse repository at this point
Copy the full SHA 377c3e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7ec9b81 - Browse repository at this point
Copy the full SHA 7ec9b81View commit details -
invoke drop glue with a ptr to (data, meta)
This is done by creating a little space on the stack. Hokey, but it's the simplest fix I can see.
Configuration menu - View commit details
-
Copy full SHA for b49a26e - Browse repository at this point
Copy the full SHA b49a26eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 693676d - Browse repository at this point
Copy the full SHA 693676dView commit details
Commits on Sep 14, 2016
-
Add checked operation methods to Duration
Eugene Bulkin committedSep 14, 2016 Configuration menu - View commit details
-
Copy full SHA for 606cded - Browse repository at this point
Copy the full SHA 606cdedView commit details -
Fix Duration::checked_mul documentation
Eugene Bulkin committedSep 14, 2016 Configuration menu - View commit details
-
Copy full SHA for 07b41b5 - Browse repository at this point
Copy the full SHA 07b41b5View commit details -
Implement add, sub, mul and div methods using checked methods for Dur…
…ation
Eugene Bulkin committedSep 14, 2016 Configuration menu - View commit details
-
Copy full SHA for b1bcd18 - Browse repository at this point
Copy the full SHA b1bcd18View commit details -
clear obligations-added flag with nested fulfillcx
This flag is a debugging measure designed to detect cases where we start a snapshot, create type variables, register obligations involving those type variables in the fulfillment cx, and then have to unroll the snapshot, leaving "dangling type variables" behind. HOWEVER, in some cases the flag is wrong. In particular, we sometimes create a "mini-fulfilment-cx" in which we enroll obligations. As long as this fulfillment cx is fully drained before we return, this is not a problem, as there won't be any escaping obligations in the main cx. So we add a fn to save/restore the flag.
Configuration menu - View commit details
-
Copy full SHA for 6353e30 - Browse repository at this point
Copy the full SHA 6353e30View commit details -
core: Use primitive indexing in slice's Index/IndexMut
[T]'s Index implementation is normally not used for indexing, instead the compiler supplied indexing is used. Use the compiler supplied version in Index/IndexMut. This removes an inconsistency: Compiler supplied bound check failures look like this: thread 'main' panicked at 'index out of bounds: the len is 3 but the index is 4' If you convince Rust to use the Index impl for slices, bounds check failure looks like this instead: thread 'main' panicked at 'assertion failed: index < self.len()' The latter is used if you for example use Index generically:: use std::ops::Index; fn foo<T: ?Sized>(x: &T) where T: Index<usize> { &x[4]; } foo(&[1, 2, 3][..])
Configuration menu - View commit details
-
Copy full SHA for a4ee9c6 - Browse repository at this point
Copy the full SHA a4ee9c6View commit details -
Eugene Bulkin committed
Sep 14, 2016 Configuration menu - View commit details
-
Copy full SHA for f2eb4f1 - Browse repository at this point
Copy the full SHA f2eb4f1View commit details
Commits on Sep 15, 2016
-
Add feature crate attribute for duration_checked_ops to docs
Eugene Bulkin committedSep 15, 2016 Configuration menu - View commit details
-
Copy full SHA for b6321bd - Browse repository at this point
Copy the full SHA b6321bdView commit details -
Rollup merge of rust-lang#36384 - petrochenkov:derclone, r=alexcrichton
Improve shallow `Clone` deriving `Copy` unions now support `#[derive(Clone)]`. Less code is generated for `#[derive(Clone, Copy)]`. + Unions now support `#[derive(Eq)]`. Less code is generated for `#[derive(Eq)]`. --- Example of code reduction: ``` enum E { A { a: u8, b: u16 }, B { c: [u8; 100] }, } ``` Before: ``` fn clone(&self) -> E { match (&*self,) { (&E::A { a: ref __self_0, b: ref __self_1 },) => { ::std::clone::assert_receiver_is_clone(&(*__self_0)); ::std::clone::assert_receiver_is_clone(&(*__self_1)); *self } (&E::B { c: ref __self_0 },) => { ::std::clone::assert_receiver_is_clone(&(*__self_0)); *self } } } ``` After: ``` fn clone(&self) -> E { { let _: ::std::clone::AssertParamIsClone<u8>; let _: ::std::clone::AssertParamIsClone<u16>; let _: ::std::clone::AssertParamIsClone<[u8; 100]>; *self } } ``` All the matches are removed, bound assertions are more lightweight. `let _: Checker<CheckMe>;`, unlike `checker(&check_me);`, doesn't have to be translated by rustc_trans and then inlined by LLVM, it doesn't even exist in MIR, this means faster compilation. --- Union impls are generated like this: ``` union U { a: u8, b: u16, c: [u8; 100], } ``` ``` fn clone(&self) -> U { { let _: ::std::clone::AssertParamIsCopy<Self>; *self } } ``` Fixes rust-lang#36043 cc @durka r? @alexcrichton
Configuration menu - View commit details
-
Copy full SHA for 7268501 - Browse repository at this point
Copy the full SHA 7268501View commit details -
Rollup merge of rust-lang#36405 - solson:typo, r=eddyb
Delete stray ` character in error message.
Configuration menu - View commit details
-
Copy full SHA for ebef6ad - Browse repository at this point
Copy the full SHA ebef6adView commit details -
Rollup merge of rust-lang#36425 - michaelwoerister:stable-projection-…
…bounds, r=eddyb Fix indeterminism in ty::TraitObject representation. Make sure that projection bounds in `ty::TraitObject` are sorted in a way that is stable across compilation sessions and crate boundaries. This PR + moves `DefPathHashes` up into `librustc` so it can be used there to create a stable sort key for `DefId`s, + changes `PolyExistentialProjection::sort_key()` to take advantage of the above, + and removes the unused `PolyProjectionPredicate::sort_key()` and `ProjectionTy::sort_key()` methods. Fixes rust-lang#36155
Configuration menu - View commit details
-
Copy full SHA for 7494bc7 - Browse repository at this point
Copy the full SHA 7494bc7View commit details -
Rollup merge of rust-lang#36429 - durka:patch-30, r=nagisa
fix "X is not a member of trait Y" span labels Fixes rust-lang#36428.
Configuration menu - View commit details
-
Copy full SHA for 23e0c24 - Browse repository at this point
Copy the full SHA 23e0c24View commit details -
Rollup merge of rust-lang#36438 - jseyfried:node_ids_in_expansion, r=nrc
Assign node ids during macro expansion After this PR, - The `ExtCtxt` can access `resolve`'s `Resolver` through the trait object `ext::base::Resolver`. - The `Resolver` trait object can load macros and replaces today's `MacroLoader` trait object. - The macro expander uses the `Resolver` trait object to resolve macro invocations. - The macro expander assigns node ids and builds the `Resolver`'s `macros_at_scope` map. - This is groundwork for merging import resolution and expansion. - Performance of expansion together with node id assignment improves by ~5%. **EDIT:** Since Github is reordering the commits, here is `git log`: - b54e1e3: Differentiate between monotonic and non-monotonic expansion and only assign node ids during monotonic expansion. - 78c0039: Expand generated test harnesses and macro registries. - f3c2dca: Remove scope placeholders from the crate root. - c86c8d4: Perform node id assignment and `macros_at_scope` construction during the `InvocationCollector` and `PlaceholderExpander` folds. - 72a6369: Move macro resolution into `librustc_resolve`. - 20b43b2: Rewrite the unit tests in `ext/expand.rs` as a `compile-fail` test. - a9821e1: Refactor `ExtCtxt` to use a `Resolver` instead of a `MacroLoader`. - 60440b2: Refactor `noop_fold_stmt_kind` out of `noop_fold_stmt`. - 50f94f6: Avoid needless reexpansions. r? @nrc
Configuration menu - View commit details
-
Copy full SHA for bab9238 - Browse repository at this point
Copy the full SHA bab9238View commit details -
Rollup merge of rust-lang#36454 - bluss:slice-primitive-index, r=alex…
…crichton Use primitive indexing in slice's Index/IndexMut [T]'s Index implementation is normally not used for indexing, instead the compiler supplied indexing is used. Use the compiler supplied version in Index/IndexMut. This removes an inconsistency: Compiler supplied bound check failures look like this: thread 'main' panicked at 'index out of bounds: the len is 3 but the index is 4' If you convince Rust to use the Index impl for slices, bounds check failure looks like this instead: thread 'main' panicked at 'assertion failed: index < self.len()' The latter is used if you for example use Index generically: ```rust use std::ops::Index; fn foo<T: ?Sized>(x: &T) where T: Index<usize> { &x[4]; } foo(&[1, 2, 3][..]) ```
Configuration menu - View commit details
-
Copy full SHA for 69a7f92 - Browse repository at this point
Copy the full SHA 69a7f92View commit details -
Rollup merge of rust-lang#36459 - nikomatsakis:issue-35546, r=eddyb
invoke drop glue with a ptr to (data, meta) This is done by creating a little space on the stack. Hokey, but it's the simplest fix I can see, and I am in "kill regressions" mode right now. Fixes rust-lang#35546 r? @eddyb
Configuration menu - View commit details
-
Copy full SHA for 959f764 - Browse repository at this point
Copy the full SHA 959f764View commit details -
Rollup merge of rust-lang#36461 - nikomatsakis:issue-36053, r=arielb1
clear obligations-added flag with nested fulfillcx This flag is a debugging measure designed to detect cases where we start a snapshot, create type variables, register obligations involving those type variables in the fulfillment cx, and then have to unroll the snapshot, leaving "dangling type variables" behind. HOWEVER, in some cases the flag is wrong. In particular, we sometimes create a "mini-fulfilment-cx" in which we enroll obligations. As long as this fulfillment cx is fully drained before we return, this is not a problem, as there won't be any escaping obligations in the main cx. So we add a fn to save/restore the flag. Fixes rust-lang#36053. r? @arielb1
Configuration menu - View commit details
-
Copy full SHA for 0c9dc53 - Browse repository at this point
Copy the full SHA 0c9dc53View commit details -
Rollup merge of rust-lang#36463 - eugene-bulkin:duration-checked-ops,…
… r=alexcrichton Add checked operation methods to Duration Addresses rust-lang#35774.
Configuration menu - View commit details
-
Copy full SHA for ec08128 - Browse repository at this point
Copy the full SHA ec08128View commit details