-
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 8 pull requests #122068
Rollup of 8 pull requests #122068
Commits on Feb 27, 2024
-
Stabilize the
#[diagnostic]
namespace and `#[diagnostic::on_unimple……mented]` attribute This PR stabilizes the `#[diagnostic]` attribute namespace and a minimal option of the `#[diagnostic::on_unimplemented]` attribute. The `#[diagnostic]` attribute namespace is meant to provide a home for attributes that allow users to influence error messages emitted by the compiler. The compiler is not guaranteed to use any of this hints, however it should accept any (non-)existing attribute in this namespace and potentially emit lint-warnings for unused attributes and options. This is meant to allow discarding certain attributes/options in the future to allow fundamental changes to the compiler without the need to keep then non-meaningful options working. The `#[diagnostic::on_unimplemented]` attribute is allowed to appear on a trait definition. This allows crate authors to hint the compiler to emit a specific error message if a certain trait is not implemented. For the `#[diagnostic::on_unimplemented]` attribute the following options are implemented: * `message` which provides the text for the top level error message * `label` which provides the text for the label shown inline in the broken code in the error message * `note` which provides additional notes. The `note` option can appear several times, which results in several note messages being emitted. If any of the other options appears several times the first occurrence of the relevant option specifies the actually used value. Any other occurrence generates an lint warning. For any other non-existing option a lint-warning is generated. All three options accept a text as argument. This text is allowed to contain format parameters referring to generic argument or `Self` by name via the `{Self}` or `{NameOfGenericArgument}` syntax. For any non-existing argument a lint warning is generated. Tracking issue: rust-lang#111996
Configuration menu - View commit details
-
Copy full SHA for d013b5a - Browse repository at this point
Copy the full SHA d013b5aView commit details
Commits on Mar 4, 2024
-
Removing absolute path in proc-macro
With rust 1.75 the absolute build path is embedding into '.rustc' section and which causes reproducibility issues. Detailed issue is here. rust-lang#120825 (comment) With this change the 'absolute path' changed back to '/rust/$hash' format.
Configuration menu - View commit details
-
Copy full SHA for a9a9798 - Browse repository at this point
Copy the full SHA a9a9798View commit details -
orion GONZALEZ (contractor) committed
Mar 4, 2024 Configuration menu - View commit details
-
Copy full SHA for cace4b0 - Browse repository at this point
Copy the full SHA cace4b0View commit details
Commits on Mar 5, 2024
-
bootstrap: print test name on failure even with
verbose-tests=false
This makes it much easier to know which test failed without having to wait for compiletest to completely finish running. Before: ``` Testing stage0 compiletest suite=ui mode=ui (x86_64-unknown-linux-gnu) running 15274 tests iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 88/15274 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 176/15274 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 264/15274 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 352/15274 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 440/15274 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 528/15274 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiFFiiiiiii ... ``` After: ``` Testing stage0 compiletest suite=ui mode=ui (x86_64-unknown-linux-gnu) running 15274 tests iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 88/15274 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 176/15274 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 264/15274 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 352/15274 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 440/15274 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 528/15274 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii [ui] tests/ui/associated-type-bounds/implied-in-supertrait.rs ... F [ui] tests/ui/associated-type-bounds/return-type-notation/basic.rs#next_with ... F iiiiiiiiiiiii ... ``` This serves a similar use case to the existing RUSTC_TEST_FAIL_FAST, but is on by default and as a result much more discoverable. We should consider unifying RUSTC_TEST_FAIL_FAST with the `--no-fail-fast` flag in the future for consistency and discoverability.
Configuration menu - View commit details
-
Copy full SHA for 678e217 - Browse repository at this point
Copy the full SHA 678e217View commit details -
libtest: Print the names of failed tests eagerly
Previously, libtest would wait until all tests finished running to print the progress, which made it annoying to run many tests at once (since you don't know which have failed). Change it to print the names as soon as they fail. This also adds a test for the terse output; previously it was untested.
Configuration menu - View commit details
-
Copy full SHA for 8bfe9db - Browse repository at this point
Copy the full SHA 8bfe9dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 38a0227 - Browse repository at this point
Copy the full SHA 38a0227View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6422be2 - Browse repository at this point
Copy the full SHA 6422be2View commit details -
Add feature gates for
f16
andf128
Includes related tests and documentation pages.
Configuration menu - View commit details
-
Copy full SHA for ad307fc - Browse repository at this point
Copy the full SHA ad307fcView commit details -
Remove unneeded
f16
andf128
parser testsSuperceded by feature gate tests.
Configuration menu - View commit details
-
Copy full SHA for 1145ba0 - Browse repository at this point
Copy the full SHA 1145ba0View commit details -
Add UI tests related to feature-gated primitives
Add a test that `f16` and `f128` are usable with the feature gate enabled, as well as a test that user types with the same name as primitives are not improperly gated.
Configuration menu - View commit details
-
Copy full SHA for b8f45a3 - Browse repository at this point
Copy the full SHA b8f45a3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2149c45 - Browse repository at this point
Copy the full SHA 2149c45View commit details -
Configuration menu - View commit details
-
Copy full SHA for 31d0a64 - Browse repository at this point
Copy the full SHA 31d0a64View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3b9dfd3 - Browse repository at this point
Copy the full SHA 3b9dfd3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 30f2ec2 - Browse repository at this point
Copy the full SHA 30f2ec2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5a0c46a - Browse repository at this point
Copy the full SHA 5a0c46aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 890dd58 - Browse repository at this point
Copy the full SHA 890dd58View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3845be6 - Browse repository at this point
Copy the full SHA 3845be6View commit details -
Configuration menu - View commit details
-
Copy full SHA for c696d4c - Browse repository at this point
Copy the full SHA c696d4cView commit details -
Configuration menu - View commit details
-
Copy full SHA for ef00fae - Browse repository at this point
Copy the full SHA ef00faeView commit details -
orion GONZALEZ (contractor) committed
Mar 5, 2024 Configuration menu - View commit details
-
Copy full SHA for beb45df - Browse repository at this point
Copy the full SHA beb45dfView commit details -
Configuration menu - View commit details
-
Copy full SHA for ebc45c8 - Browse repository at this point
Copy the full SHA ebc45c8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6120de9 - Browse repository at this point
Copy the full SHA 6120de9View commit details
Commits on Mar 6, 2024
-
Rollup merge of rust-lang#113518 - jyn514:streaming-failures, r=cuviper
bootstrap/libtest: print test name eagerly on failure even with `verbose-tests=false` / `--quiet` Previously, libtest would wait until all tests finished running to print the progress, which made it annoying to run many tests at once (since you don't know which have failed). Change it to print the names as soon as they fail. This makes it much easier to know which test failed without having to wait for compiletest to completely finish running. Before: ``` Testing stage0 compiletest suite=ui mode=ui (x86_64-unknown-linux-gnu) running 15274 tests iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 88/15274 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 176/15274 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 264/15274 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 352/15274 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 440/15274 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 528/15274 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiFFiiiiiii ... ``` After: ``` Testing stage0 compiletest suite=ui mode=ui (x86_64-unknown-linux-gnu) running 15274 tests iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 88/15274 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 176/15274 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 264/15274 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 352/15274 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 440/15274 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 528/15274 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii [ui] tests/ui/associated-type-bounds/implied-in-supertrait.rs ... F [ui] tests/ui/associated-type-bounds/return-type-notation/basic.rs#next_with ... F iiiiiiiiiiiii ... ``` This serves a similar use case to the existing RUSTC_TEST_FAIL_FAST, but is on by default and as a result much more discoverable. We should consider unifying RUSTC_TEST_FAIL_FAST with the `--no-fail-fast` flag in the future for consistency and discoverability.
Configuration menu - View commit details
-
Copy full SHA for 6f857a3 - Browse repository at this point
Copy the full SHA 6f857a3View commit details -
Rollup merge of rust-lang#119888 - weiznich:stablize_diagnostic_names…
…pace, r=compiler-errors Stabilize the `#[diagnostic]` namespace and `#[diagnostic::on_unimplemented]` attribute This PR stabilizes the `#[diagnostic]` attribute namespace and a minimal option of the `#[diagnostic::on_unimplemented]` attribute. The `#[diagnostic]` attribute namespace is meant to provide a home for attributes that allow users to influence error messages emitted by the compiler. The compiler is not guaranteed to use any of this hints, however it should accept any (non-)existing attribute in this namespace and potentially emit lint-warnings for unused attributes and options. This is meant to allow discarding certain attributes/options in the future to allow fundamental changes to the compiler without the need to keep then non-meaningful options working. The `#[diagnostic::on_unimplemented]` attribute is allowed to appear on a trait definition. This allows crate authors to hint the compiler to emit a specific error message if a certain trait is not implemented. For the `#[diagnostic::on_unimplemented]` attribute the following options are implemented: * `message` which provides the text for the top level error message * `label` which provides the text for the label shown inline in the broken code in the error message * `note` which provides additional notes. The `note` option can appear several times, which results in several note messages being emitted. If any of the other options appears several times the first occurrence of the relevant option specifies the actually used value. Any other occurrence generates an lint warning. For any other non-existing option a lint-warning is generated. All three options accept a text as argument. This text is allowed to contain format parameters referring to generic argument or `Self` by name via the `{Self}` or `{NameOfGenericArgument}` syntax. For any non-existing argument a lint warning is generated. This allows to have a trait definition like: ```rust #[diagnostic::on_unimplemented( message = "My Message for `ImportantTrait<{A}>` is not implemented for `{Self}`", label = "My Label", note = "Note 1", note = "Note 2" )] trait ImportantTrait<A> {} ``` which then generates for the following code ```rust fn use_my_trait(_: impl ImportantTrait<i32>) {} fn main() { use_my_trait(String::new()); } ``` this error message: ``` error[E0277]: My Message for `ImportantTrait<i32>` is not implemented for `String` --> src/main.rs:14:18 | 14 | use_my_trait(String::new()); | ------------ ^^^^^^^^^^^^^ My Label | | | required by a bound introduced by this call | = help: the trait `ImportantTrait<i32>` is not implemented for `String` = note: Note 1 = note: Note 2 ``` [Playground with the unstable feature](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=05133acce8e1d163d481e97631f17536) Fixes rust-lang#111996
Configuration menu - View commit details
-
Copy full SHA for 400410e - Browse repository at this point
Copy the full SHA 400410eView commit details -
Rollup merge of rust-lang#121089 - oli-obk:create_def_feed, r=petroch…
…enkov Remove `feed_local_def_id` best reviewed commit by commit Basically I returned `TyCtxtFeed` from `create_def` and then preserved that in the local caches based on rust-lang#121084 r? ``@petrochenkov``
Configuration menu - View commit details
-
Copy full SHA for 21f1101 - Browse repository at this point
Copy the full SHA 21f1101View commit details -
Rollup merge of rust-lang#121926 - tgross35:f16-f128-step3-feature-ga…
…te, r=compiler-errors `f16` and `f128` step 3: compiler support & feature gate Continuation of rust-lang#121841, another portion of rust-lang#114607 This PR exposes the new types to the world and adds a feature gate. Marking this as a draft because I need some feedback on where I did the feature gate check. It also does not yet catch type via suffixed literals (so the feature gate test will fail, probably some others too because I haven't belssed). If there is a better place to check all types after resolution, I can do that. If not, I figure maybe I can add a second gate location in AST when it checks numeric suffixes. Unfortunately I still don't think there is much testing to be done for correctness (codegen tests or parsed value checks) until we have basic library support. I think that will be the next step. Tracking issue: rust-lang#116909 r? ```@compiler-errors``` cc ```@Nilstrieb``` ```@rustbot``` label +F-f16_and_f128
Configuration menu - View commit details
-
Copy full SHA for 71ef1c6 - Browse repository at this point
Copy the full SHA 71ef1c6View commit details -
Rollup merge of rust-lang#121959 - sundeep-kokkonda:patch-2, r=davidtwco
Removing absolute path in proc-macro With rust 1.75 the absolute build path name is embedding into proc-macro (.rustc section) and which causes reproducibility issues. Detailed issue description is here - rust-lang#120825 (comment) With this change the 'absolute path' changed back to '/rust/$hash' format as in earlier revisions.
Configuration menu - View commit details
-
Copy full SHA for a966e27 - Browse repository at this point
Copy the full SHA a966e27View commit details -
Rollup merge of rust-lang#122015 - dev-ardi:master, r=nnethercote
Add better explanation for `rustc_index::IndexVec` I feel like I didn't do a great job explaining what this does in rust-lang#119800, so this PR tries to give an example of why and how you would use it. Addresses rust-lang#93792.
Configuration menu - View commit details
-
Copy full SHA for 7e3a2a0 - Browse repository at this point
Copy the full SHA 7e3a2a0View commit details -
Rollup merge of rust-lang#122027 - compiler-errors:rpitit-cycle, r=sp…
…astorino Uplift some feeding out of `associated_type_for_impl_trait_in_impl` and into queries This PR moves the `type_of` and `generics_of` query feeding out of `associated_type_for_impl_trait_in_impl`, since eagerly feeding results in query cycles due to a subtle interaction with `resolve_bound_vars`. Fixes rust-lang#122019 r? spastorino
Configuration menu - View commit details
-
Copy full SHA for 5fbfb5b - Browse repository at this point
Copy the full SHA 5fbfb5bView commit details -
Rollup merge of rust-lang#122038 - Alexendoo:unused-qualifications, r…
…=petrochenkov Fix linting paths with qself in `unused_qualifications` Fixes rust-lang#121999 `resolve_qpath` ends up being called again with `qself` set to `None` to check trait items from fully qualified paths. To avoid this the lint is moved to a place that accounts for this already https://github.com/rust-lang/rust/blob/96561a8fd134e8f2b205769a4fca03b392d9f484/compiler/rustc_resolve/src/late.rs#L4074-L4088 r? ```@petrochenkov```
Configuration menu - View commit details
-
Copy full SHA for 7ce4f1e - Browse repository at this point
Copy the full SHA 7ce4f1eView commit details