-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Poor diagnostic for impl for T
#56031
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
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.
# for free
to join this conversation on GitHub.
Already have an account?
# 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: