Skip to content
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

E0404 error explanation is too narrow #31687

Closed
nagisa opened this issue Feb 15, 2016 · 4 comments
Closed

E0404 error explanation is too narrow #31687

nagisa opened this issue Feb 15, 2016 · 4 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@nagisa
Copy link
Member

nagisa commented Feb 15, 2016

The E0404 is explaining something about implementing non-traits, but the error code is also presented for cases like in #31686. The error explanation should either be expanded to include the current case or a different error code should be used.

cc @GuillaumeGomez on the thing described in this comment, since you originally authored the explanation for the code.

@GuillaumeGomez
Copy link
Member

Thanks! I'll take a look as soon as I can.

@GuillaumeGomez
Copy link
Member

The following code (wrote by @nagisa) reproduces it:

struct A<'a> {
    a: ::std::marker::PhantomData<&'a ()>
}

struct B {
    b: for<'a> A<'a>
}

fn main(){}

I think the best solution here is to create another error code.

@apasel422 apasel422 added the A-diagnostics Area: Messages for errors, warnings, and lints label Jun 17, 2016
@steveklabnik steveklabnik removed the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 9, 2017
@Mark-Simulacrum Mark-Simulacrum added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Jul 24, 2017
@oli-obk oli-obk added the E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. label Jan 25, 2020
@oli-obk
Copy link
Contributor

oli-obk commented Jan 25, 2020

I think updating the docs to also include dyn Trait types is the best solution here as it looks like the same underlying problem to me

@Dylan-DPC-zz
Copy link

This is fixed as E0404 is now reworked with the other error code in #69887

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 C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

7 participants