-
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
Incomplete explanation of E0404 #43913
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
F-trait_alias
`#![feature(trait_alias)]`
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
One more thing, even though the compiler lets me create an alias for a trait, I don't know when I can use such an alias. Maybe this should be explained too. |
Mark-Simulacrum
added
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
labels
Aug 20, 2017
estebank
added
F-trait_alias
`#![feature(trait_alias)]`
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Jan 22, 2020
Current output (in nightly):
|
estebank
added
the
D-papercut
Diagnostics: An error or lint that needs small tweaks.
label
Jan 22, 2020
estebank
added
the
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
label
Feb 1, 2020
Current output:
No structured suggestion for the nightly feature (should be |
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Apr 20, 2021
Add a suggestion when using a type alias instead of trait alias Fixes rust-lang#43913 r? `@estebank`
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Apr 20, 2021
Add a suggestion when using a type alias instead of trait alias Fixes rust-lang#43913 r? ``@estebank``
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Apr 20, 2021
Add a suggestion when using a type alias instead of trait alias Fixes rust-lang#43913 r? ```@estebank```
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Apr 22, 2021
Add a suggestion when using a type alias instead of trait alias Fixes rust-lang#43913 r? `@estebank`
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Apr 22, 2021
Add a suggestion when using a type alias instead of trait alias Fixes rust-lang#43913 r? ``@estebank``
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Apr 22, 2021
Add a suggestion when using a type alias instead of trait alias Fixes rust-lang#43913 r? ```@estebank```
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Apr 22, 2021
Add a suggestion when using a type alias instead of trait alias Fixes rust-lang#43913 r? ````@estebank````
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Apr 22, 2021
Add a suggestion when using a type alias instead of trait alias Fixes rust-lang#43913 r? `````@estebank`````
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Apr 23, 2021
Add a suggestion when using a type alias instead of trait alias Fixes rust-lang#43913 r? ``````@estebank``````
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
F-trait_alias
`#![feature(trait_alias)]`
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I managed to reproduce the problem with this snippet:
The compiler yells E0404 at me, but fair enough I always ask it to
--explain
a bit more about it :)However this time, it only says this:
This is confusing because the snippet above doesn't involve the
impl
keyword so I didn't understand initially what I was doing wrong, then I read the error message again:I first tried this, and it worked, but having to repeat the whole syntax everywhere wasn't too compelling, hence the alias:
The compiler error message makes it very clear that I can't alias a trait, but the E0404 explanation doesn't mention it at all. I hope the description could also include this use case as I've seen sometimes EXXXX explanations go over several facets of the same problem. That won't help me, but maybe others that may trip on the same problem. I would have submitted a pull request for the docs myself, but I have no idea why you can't use type aliases for traits so I can't
--explain
it ;)I'm using stable Rust 1.19.0 (on Fedora).
The text was updated successfully, but these errors were encountered: