-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Impl trait diagnostic tweaks #119703
Impl trait diagnostic tweaks #119703
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
r? fmease or feel free to reassign if you don't want to review it 😆 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, very nice! r=me with or without nits fixed
@@ -1,7 +1,7 @@ | |||
struct Bug { | |||
V1: [(); { | |||
let f: impl core::future::Future<Output = u8> = async { 1 }; | |||
//~^ `impl Trait` only allowed in function and inherent method argument and return types | |||
//~^ `impl Trait` is not allowed in variable bindings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in variable bindings
is fine but in the type of variable bindings
is better imo, not super important
@bors r+ rollup |
wait i'll fix that variable binding nit |
@bors r- |
ok ok :) |
94de510
to
7e38b70
Compare
@bors r+ |
… r=fmease Impl trait tweaks 1. Tweak some names for `impl Trait` being used in the wrong position 2. Remove two helper functions that are no longer needed since RPITIT is stable, and which causes matches to be a bit obtuse. 3. Split and fix the part where the error notes that it's "only allowed in XX" Fixes rust-lang#119629
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#116129 (Rewrite `pin` module documentation to clarify usage and invariants) - rust-lang#119702 (Miri subtree update) - rust-lang#119703 (Impl trait tweaks) - rust-lang#119705 (Support `~const` in associated functions in trait impls) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#116129 (Rewrite `pin` module documentation to clarify usage and invariants) - rust-lang#119703 (Impl trait diagnostic tweaks) - rust-lang#119705 (Support `~const` in associated functions in trait impls) - rust-lang#119708 (Unions are not `PointerLike`) - rust-lang#119711 (Delete unused makefile in tests/ui) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#119703 - compiler-errors:impl-trait-tweaks, r=fmease Impl trait diagnostic tweaks 1. Tweak some names for `impl Trait` being used in the wrong position 2. Remove two helper functions that are no longer needed since RPITIT is stable, and which causes matches to be a bit obtuse. 3. Split and fix the part where the error notes that it's "only allowed in XX" Fixes rust-lang#119629
impl Trait
being used in the wrong positionFixes #119629