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

Error Index for E0207 needs to mention const, lifetime parameters #80862

Closed
Havvy opened this issue Jan 10, 2021 · 1 comment · Fixed by #103757
Closed

Error Index for E0207 needs to mention const, lifetime parameters #80862

Havvy opened this issue Jan 10, 2021 · 1 comment · Fixed by #103757
Assignees
Labels
A-const-generics Area: const generics (parameters and arguments) A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools A-error-codes Area: Explanation of an error code (--explain) 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

@Havvy
Copy link
Contributor

Havvy commented Jan 10, 2021

As it is currently written, E0207 talks entirely about type parameters. Now that const parameters also need to constrain implementations (under the same rules described for types), they also need to be mentioned in the error explanation. Since other items don't require const parameters to be used at all, we might also want to specifically call out this difference here.

Furthermore, E0207 triggers if you use an unconstrained lifetime in an associated type, and this is completely unspecified by the error as well.

@Havvy Havvy added A-const-generics Area: const generics (parameters and arguments) A-error-codes Area: Explanation of an error code (--explain) labels Jan 10, 2021
@JohnTitor JohnTitor added C-enhancement Category: An issue proposing an enhancement or a PR with one. A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools labels Jan 10, 2021
@Havvy Havvy changed the title Error Index for E0207 needs to mention const parameters Error Index for E0207 needs to mention const, lifetime parameters Jan 11, 2021
@Dylan-DPC Dylan-DPC added the E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. label Oct 26, 2022
@ffmancera
Copy link
Contributor

@rustbot claim

Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Nov 7, 2022
…h726

Mention const and lifetime parameters in error E0207

Error Index for E0207 must mention const and lifetime parameters. In addition, add code examples for these situations.

Fixes rust-lang#80862
@bors bors closed this as completed in 2159df2 Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-generics Area: const generics (parameters and arguments) A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools A-error-codes Area: Explanation of an error code (--explain) 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

Successfully merging a pull request may close this issue.

4 participants