-
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 10 pull requests #73408
Rollup of 10 pull requests #73408
Commits on May 30, 2020
-
Configuration menu - View commit details
-
Copy full SHA for f7d745f - Browse repository at this point
Copy the full SHA f7d745fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a6d03c - Browse repository at this point
Copy the full SHA 7a6d03cView commit details
Commits on Jun 6, 2020
-
Configuration menu - View commit details
-
Copy full SHA for e9b67d2 - Browse repository at this point
Copy the full SHA e9b67d2View commit details
Commits on Jun 7, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 5837518 - Browse repository at this point
Copy the full SHA 5837518View commit details -
Configuration menu - View commit details
-
Copy full SHA for d684855 - Browse repository at this point
Copy the full SHA d684855View commit details -
Configuration menu - View commit details
-
Copy full SHA for b5fdbbe - Browse repository at this point
Copy the full SHA b5fdbbeView commit details -
Preserve expressions that get a
DefId
Namely closures and `async` blocks. We have to make a few modifications to closures to make them compile.
Configuration menu - View commit details
-
Copy full SHA for d8c99f3 - Browse repository at this point
Copy the full SHA d8c99f3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1a30042 - Browse repository at this point
Copy the full SHA 1a30042View commit details -
Configuration menu - View commit details
-
Copy full SHA for e319f20 - Browse repository at this point
Copy the full SHA e319f20View commit details
Commits on Jun 10, 2020
-
Configuration menu - View commit details
-
Copy full SHA for c920ae9 - Browse repository at this point
Copy the full SHA c920ae9View commit details -
Consider fewer predicates for projection candidates
We now require that projection candidates are applicable with the idenitity substs of the trait, rather than allowing predicates that are only applicable for certain substs.
Configuration menu - View commit details
-
Copy full SHA for d14ee0b - Browse repository at this point
Copy the full SHA d14ee0bView commit details -
Check associated type satisfy their bounds
This was currently only happening due to eager normalization, which isn't possible if there's specialization or bound variables.
Configuration menu - View commit details
-
Copy full SHA for fb16ee7 - Browse repository at this point
Copy the full SHA fb16ee7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 373c735 - Browse repository at this point
Copy the full SHA 373c735View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2af53e9 - Browse repository at this point
Copy the full SHA 2af53e9View commit details
Commits on Jun 11, 2020
-
Move bounds on associated types to the type
Given `trait X { type U; }` the bound `<Self as X>::U` now lives on the type, rather than the trait. This is feature gated on `feature(generic_associated_types)` for now until more testing can be done. The also enabled type-generic associated types since we no longer need "implies bounds".
Configuration menu - View commit details
-
Copy full SHA for 83c5028 - Browse repository at this point
Copy the full SHA 83c5028View commit details
Commits on Jun 12, 2020
-
Configuration menu - View commit details
-
Copy full SHA for f0d2e78 - Browse repository at this point
Copy the full SHA f0d2e78View commit details
Commits on Jun 13, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 01e29c7 - Browse repository at this point
Copy the full SHA 01e29c7View commit details -
Configuration menu - View commit details
-
Copy full SHA for e785472 - Browse repository at this point
Copy the full SHA e785472View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0687b78 - Browse repository at this point
Copy the full SHA 0687b78View commit details
Commits on Jun 14, 2020
-
Configuration menu - View commit details
-
Copy full SHA for d5ea0e9 - Browse repository at this point
Copy the full SHA d5ea0e9View commit details -
Configuration menu - View commit details
-
Copy full SHA for a40156e - Browse repository at this point
Copy the full SHA a40156eView commit details -
Switch bootstrap metadata to --no-deps.
This should run much faster. There are also some drive-by cleanups here to try to simplify things. Also, the paths for in-tree crates are now displayed as relative in `x.py test -h -v`.
Configuration menu - View commit details
-
Copy full SHA for 607e851 - Browse repository at this point
Copy the full SHA 607e851View commit details -
Configuration menu - View commit details
-
Copy full SHA for c2b920f - Browse repository at this point
Copy the full SHA c2b920fView commit details
Commits on Jun 15, 2020
-
Configuration menu - View commit details
-
Copy full SHA for f17fd7b - Browse repository at this point
Copy the full SHA f17fd7bView commit details -
Change how compiler-builtins gets many CGUs
This commit intends to fix an accidental regression from rust-lang#70846. The goal of rust-lang#70846 was to build compiler-builtins with a maximal number of CGUs to ensure that each module in the source corresponds to an object file. This high degree of control for compiler-builtins is desirable to ensure that there's at most one exported symbol per CGU, ideally enabling compiler-builtins to not conflict with the system libgcc as often. In rust-lang#70846, however, only part of the compiler understands that compiler-builtins is built with many CGUs. The rest of the compiler thinks it's building with `sess.codegen_units()`. Notably the calculation of `sess.lto()` consults `sess.codegen_units()`, which when there's only one CGU it disables ThinLTO. This means that compiler-builtins is built without ThinLTO, which is quite harmful to performance! This is the root of the cause from rust-lang#73135 where intrinsics were found to not be inlining trivial functions. The fix applied in this commit is to remove the special-casing of compiler-builtins in the compiler. Instead the build system is now responsible for special-casing compiler-builtins. It doesn't know exactly how many CGUs will be needed but it passes a large number that is assumed to be much greater than the number of source-level modules needed. After reading the various locations in the compiler source, this seemed like the best solution rather than adding more and more special casing in the compiler for compiler-builtins. Closes rust-lang#73135
Configuration menu - View commit details
-
Copy full SHA for d6156e8 - Browse repository at this point
Copy the full SHA d6156e8View commit details -
Tweak "non-primitive cast" error
- Suggest borrowing expression if it would allow cast to work. - Suggest using `<Type>::from(<expr>)` when appropriate. - Minor tweak to `;` typo suggestion. Partily address rust-lang#47136.
Configuration menu - View commit details
-
Copy full SHA for e857696 - Browse repository at this point
Copy the full SHA e857696View commit details -
Configuration menu - View commit details
-
Copy full SHA for 81c9094 - Browse repository at this point
Copy the full SHA 81c9094View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4e90f17 - Browse repository at this point
Copy the full SHA 4e90f17View commit details -
Configuration menu - View commit details
-
Copy full SHA for 921f35f - Browse repository at this point
Copy the full SHA 921f35fView commit details -
Configuration menu - View commit details
-
Copy full SHA for e755889 - Browse repository at this point
Copy the full SHA e755889View commit details -
Configuration menu - View commit details
-
Copy full SHA for bc15790 - Browse repository at this point
Copy the full SHA bc15790View commit details -
Configuration menu - View commit details
-
Copy full SHA for 539e978 - Browse repository at this point
Copy the full SHA 539e978View commit details -
Configuration menu - View commit details
-
Copy full SHA for 31ea589 - Browse repository at this point
Copy the full SHA 31ea589View commit details -
Configuration menu - View commit details
-
Copy full SHA for 10d9bf1 - Browse repository at this point
Copy the full SHA 10d9bf1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 34d8692 - Browse repository at this point
Copy the full SHA 34d8692View commit details -
Configuration menu - View commit details
-
Copy full SHA for e31367d - Browse repository at this point
Copy the full SHA e31367dView commit details -
Configuration menu - View commit details
-
Copy full SHA for f7a1f97 - Browse repository at this point
Copy the full SHA f7a1f97View commit details -
Configuration menu - View commit details
-
Copy full SHA for bfe1434 - Browse repository at this point
Copy the full SHA bfe1434View commit details -
Update src/librustc_typeck/check/cast.rs
Co-authored-by: lzutao <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b5809b0 - Browse repository at this point
Copy the full SHA b5809b0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 10c8d2a - Browse repository at this point
Copy the full SHA 10c8d2aView commit details
Commits on Jun 16, 2020
-
Configuration menu - View commit details
-
Copy full SHA for f3dfe80 - Browse repository at this point
Copy the full SHA f3dfe80View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0265e4e - Browse repository at this point
Copy the full SHA 0265e4eView commit details -
Rollup merge of rust-lang#72279 - RalfJung:raw-ref-macros, r=nikomats…
…akis add raw_ref macros In rust-lang#64490, various people were in favor of exposing `&raw` as a macro first before making the actual syntax stable. So this PR (unstably) introduces those macros. I'll create the tracking issue if we're okay moving forward with this.
Configuration menu - View commit details
-
Copy full SHA for b03de50 - Browse repository at this point
Copy the full SHA b03de50View commit details -
Rollup merge of rust-lang#72331 - oddg:forbid-cast-of-cenum-implement…
…ing-drop, r=matthewjasper,nikomatsakis Report error when casting an C-like enum implementing Drop Following approach described in rust-lang#35941
Configuration menu - View commit details
-
Copy full SHA for 259b3f6 - Browse repository at this point
Copy the full SHA 259b3f6View commit details -
Rollup merge of rust-lang#72497 - RalfJung:tag-term, r=oli-obk
tag/niche terminology cleanup The term "discriminant" was used in two ways throughout the compiler: * every enum variant has a corresponding discriminant, that can be given explicitly with `Variant = N`. * that discriminant is then encoded in memory to store which variant is active -- but this encoded form of the discriminant was also often called "discriminant", even though it is conceptually quite different (e.g., it can be smaller in size, or even use niche-filling). After discussion with @eddyb, this renames the second term to "tag". The way the tag is encoded can be either `TagEncoding::Direct` (formerly `DiscriminantKind::Tag`) or `TagEncoding::Niche` (formerly `DiscrimianntKind::Niche`). This finally resolves some long-standing confusion I had about the handling of variant indices and discriminants, which surfaced in rust-lang#72419. (There is also a `DiscriminantKind` type in libcore, it remains unaffected. I think this corresponds to the discriminant, not the tag, so that seems all right.) r? @eddyb
Configuration menu - View commit details
-
Copy full SHA for dd83a9b - Browse repository at this point
Copy the full SHA dd83a9bView commit details -
Rollup merge of rust-lang#72788 - matthewjasper:projection-bound-vali…
…dation, r=nikomatsakis Projection bound validation During selection we use bounds declared on associated types (e.g. `type X: Copy`) to satisfy trait/projection bounds. This would be fine so long as those bounds are checked on any impls/trait objects. For simple cases they are because the bound `Self::X: Copy` gets normalized when we check the impl. However, for default values with specialization and higher-ranked bounds from GATs or otherwise, we can't normalize when checking the impl, and so we use the bound from the trait to prove that the bound applies to the impl, which is clearly unsound. This PR makes 2 fixes for this: 1. Requiring that the bounds on the trait apply to a projection type with the corresponding substs, so a bound `for<'a> <Self as X<'a>>::U: Copy` on the trait cannot be used to prove `<T as X<'_>>::U: Copy`. 2. Actually checking that the bounds that we still allow apply to generic/default associated types. Opening for a crater run. Closes rust-lang#68641 Closes rust-lang#68642 Closes rust-lang#68643 Closes rust-lang#68644 Closes rust-lang#68645 Closes rust-lang#68656 r? @ghost
Configuration menu - View commit details
-
Copy full SHA for 0daff91 - Browse repository at this point
Copy the full SHA 0daff91View commit details -
Rollup merge of rust-lang#72804 - estebank:opaque-missing-lts-in-fn-2…
…, r=nikomatsakis Further tweak lifetime errors involving `dyn Trait` and `impl Trait` in return position * Suggest substituting `'static` lifetime in impl/dyn `Trait + 'static` instead of `Trait + 'static + '_` * When `'static` is explicit, also suggest constraining argument with it * Reduce verbosity of suggestion message and mention lifetime in label * Tweak output for overlapping required/captured spans * Give these errors an error code Follow up to rust-lang#72543. r? @nikomatsakis
Configuration menu - View commit details
-
Copy full SHA for 49cbe7a - Browse repository at this point
Copy the full SHA 49cbe7aView commit details -
Rollup merge of rust-lang#73065 - Amanieu:tls-fix, r=oli-obk
Fix link error with #[thread_local] introduced by rust-lang#71192 r? @oli-obk
Configuration menu - View commit details
-
Copy full SHA for 00816ca - Browse repository at this point
Copy the full SHA 00816caView commit details -
Rollup merge of rust-lang#73103 - ecstatic-morse:replace-body-with-lo…
…op, r=pnkfelix Preserve `Expr`s that have `DefId`s in `ReplaceBodyWithLoop` This PR fixes rust-lang#71820 as well as the last part of rust-lang#71104 by preserving expressions that are assigned their own `DefId`s (closures and `async` blocks) when passing them to `rustdoc`. This avoids having a `DefId` without a corresponding `HirId`. The first commit in this PR makes `-Zunpretty=everybody_loops` actually work again, and the subsequent two are miscellaneous cleanup. They should probably get merged regardless of what we end up doing here. Sample input: ```rust fn foo() -> Box<i32> { let x = |a: i64| { const FOO: i64 = 1; }; let a = 4; Box::new(a) } ``` Sample output: ```rust fn foo() -> Box<i32> { || -> ! { const FOO: i64 = 1; loop { } }; loop { } } ``` r? @ghost
Configuration menu - View commit details
-
Copy full SHA for 289dabd - Browse repository at this point
Copy the full SHA 289dabdView commit details -
Rollup merge of rust-lang#73136 - alexcrichton:thinlto-compiler-built…
…ins, r=Mark-Simulacrum Change how compiler-builtins gets many CGUs This commit intends to fix an accidental regression from rust-lang#70846. The goal of rust-lang#70846 was to build compiler-builtins with a maximal number of CGUs to ensure that each module in the source corresponds to an object file. This high degree of control for compiler-builtins is desirable to ensure that there's at most one exported symbol per CGU, ideally enabling compiler-builtins to not conflict with the system libgcc as often. In rust-lang#70846, however, only part of the compiler understands that compiler-builtins is built with many CGUs. The rest of the compiler thinks it's building with `sess.codegen_units()`. Notably the calculation of `sess.lto()` consults `sess.codegen_units()`, which when there's only one CGU it disables ThinLTO. This means that compiler-builtins is built without ThinLTO, which is quite harmful to performance! This is the root of the cause from rust-lang#73135 where intrinsics were found to not be inlining trivial functions. The fix applied in this commit is to remove the special-casing of compiler-builtins in the compiler. Instead the build system is now responsible for special-casing compiler-builtins. It doesn't know exactly how many CGUs will be needed but it passes a large number that is assumed to be much greater than the number of source-level modules needed. After reading the various locations in the compiler source, this seemed like the best solution rather than adding more and more special casing in the compiler for compiler-builtins. Closes rust-lang#73135
Configuration menu - View commit details
-
Copy full SHA for 16b1a49 - Browse repository at this point
Copy the full SHA 16b1a49View commit details -
Rollup merge of rust-lang#73352 - ehuss:bootstrap-metadata, r=Mark-Si…
…mulacrum Speed up bootstrap a little. The bootstrap script was calling `cargo metadata` 3 times (or 6 with `-v`). This is a very expensive operation, and this attempts to avoid the extra calls. On my system, a simple command like `./x.py test -h -v` goes from about 3 seconds to 0.4. An overview of the changes: - Call `cargo metadata` only once with `--no-deps`. Optional dependencies are filtered in `in_tree_crates` (handling `profiler_builtins` and `rustc_codegen_llvm` which are driven by the config). - Remove a duplicate call to `metadata::build` when using `-v`. I'm not sure why it was there, it looks like a mistake or vestigial from previous behavior. - Remove check for `_shim`, I believe all the `_shim` crates are now gone. - Remove check for `rustc_` and `*san` for `test::Crate::should_run`, these are no longer dependencies in the `test` tree. - Use relative paths in `./x.py test -h -v` output. - Some code cleanup (remove unnecessary `find_compiler_crates`, etc.). - Show suite paths (`src/test/ui/...`) in `./x.py test -h -v` output. - Some doc comments.
Configuration menu - View commit details
-
Copy full SHA for c824b3b - Browse repository at this point
Copy the full SHA c824b3bView commit details -
Rollup merge of rust-lang#73361 - estebank:non-primitive-cast, r=davi…
…dtwco Tweak "non-primitive cast" error - Suggest borrowing expression if it would allow cast to work. - Suggest using `<Type>::from(<expr>)` when appropriate. - Minor tweak to `;` typo suggestion. Partily address rust-lang#47136.
Configuration menu - View commit details
-
Copy full SHA for b2b67e4 - Browse repository at this point
Copy the full SHA b2b67e4View commit details