-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Poor diagnostic for impl for T
#56031
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
Comments
Maybe relatedly, this code compiles on stable 1.30.0: trait Trait {}
impl for<'a> Trait {}
fn main() {} |
Centril
added a commit
to Centril/rust
that referenced
this issue
Mar 10, 2019
…rochenkov Adds help message in error for invalid `impl for T` syntax Fixes rust-lang#56031.
Centril
added a commit
to Centril/rust
that referenced
this issue
Mar 10, 2019
…rochenkov Adds help message in error for invalid `impl for T` syntax Fixes rust-lang#56031.
Centril
added a commit
to Centril/rust
that referenced
this issue
Mar 10, 2019
…rochenkov Adds help message in error for invalid `impl for T` syntax Fixes rust-lang#56031.
Centril
added a commit
to Centril/rust
that referenced
this issue
Mar 10, 2019
…rochenkov Adds help message in error for invalid `impl for T` syntax Fixes rust-lang#56031.
Centril
added a commit
to Centril/rust
that referenced
this issue
Mar 11, 2019
…rochenkov Adds help message in error for invalid `impl for T` syntax Fixes rust-lang#56031.
bors
added a commit
that referenced
this issue
Mar 18, 2019
Adds help message in error for invalid `impl for T` syntax Fixes #56031.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I accidentally typed
impl for T
instead ofimpl T
, and the diagnostic (playground) wasn't very helpful:This appears to be because of this syntax:
However it makes no sense in this case. Perhaps better diagnostics would look something like this:
The text was updated successfully, but these errors were encountered: