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

Add missing long error code explanations #61137

Closed
98 of 100 tasks
GuillaumeGomez opened this issue May 24, 2019 · 69 comments · Fixed by #108482
Closed
98 of 100 tasks

Add missing long error code explanations #61137

GuillaumeGomez opened this issue May 24, 2019 · 69 comments · Fixed by #108482
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 D-newcomer-roadblock Diagnostics: Confusing error or lint; hard to understand for new users. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-help-wanted Call for participation: Help is requested to fix this issue. metabug Issues about issues themselves ("bugs about bugs") T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented May 24, 2019

This is a re-opening of #32777.

Explanations

Those error codes and their explanations are declared in files named error_codes.rs. In those files, you can see generally two macros: register_diagnostics and register_long_diagnostics. If an error code is in register_diagnostics, it means it lacks long error explanation. The goal of this issue is to add those missing explanations!

This is an easy first issue but don't hesitate to ask for help if you're stuck on something!

Here is the list of all error codes that don't have a long error explanation yet:

@GuillaumeGomez GuillaumeGomez added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. A-diagnostics Area: Messages for errors, warnings, and lints labels May 24, 2019
@imbrem
Copy link
Contributor

imbrem commented May 25, 2019

Can I take one of these on?

@GuillaumeGomez
Copy link
Member Author

@imbrem: Sure, go ahead! When you open a PR, please link to this issue so others can see what's being worked on.

@imbrem
Copy link
Contributor

imbrem commented May 26, 2019

Done! Actually, should I have requested/should I request you as a reviewer?

ewk added a commit to ewk/rust that referenced this issue May 27, 2019
Centril added a commit to Centril/rust that referenced this issue May 28, 2019
@Krout0n
Copy link
Contributor

Krout0n commented May 31, 2019

Can I take one of these on too?

@GuillaumeGomez
Copy link
Member Author

Sure, go ahead (and thanks!). Just like I told previously: don't forget to link to this issue once your PR is open so we can keep track. :)

bors added a commit that referenced this issue Jun 18, 2019
@estebank estebank added the A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools label Jul 12, 2019
@estebank
Copy link
Contributor

estebank commented Sep 5, 2019

E0307 handled in #64110.

@Mark-Simulacrum Mark-Simulacrum added E-help-wanted Call for participation: Help is requested to fix this issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. and removed E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. labels Sep 11, 2019
Centril added a commit to Centril/rust that referenced this issue Sep 13, 2019
Centril added a commit to Centril/rust that referenced this issue Sep 21, 2019
Centril added a commit to Centril/rust that referenced this issue Sep 23, 2019
Centril added a commit to Centril/rust that referenced this issue Sep 24, 2019
@bindsdev
Copy link
Contributor

I was working on adding an explanation for E0313. But, I hit a roadblock in doing so and I was recommended by other contributors to propose a deprecation for the error code (#103742) since it seemingly isn't emitted anymore by the current revision of the borrow checker and it has no UI tests. Please view the reference issue for more background.

jyn514 added a commit to jyn514/rust that referenced this issue Dec 30, 2022
refactor: merge error code `E0465` into `E0464`

`E0465` is an undocumented and untested error code that is functionally identical to `E0464`. This PR merges `E0465` into `E0464`, thus documenting and testing another error code (rust-lang#61137).

r? `@GuillaumeGomez` (not sure if you want to review this but it's relevant to my other PRs that you have reviewed)
bors added a commit to rust-lang-ci/rust that referenced this issue Dec 31, 2022
refactor: merge error code `E0465` into `E0464`

`E0465` is an undocumented and untested error code that is functionally identical to `E0464`. This PR merges `E0465` into `E0464`, thus documenting and testing another error code (rust-lang#61137).

r? `@GuillaumeGomez` (not sure if you want to review this but it's relevant to my other PRs that you have reviewed)
@oskgo oskgo mentioned this issue Jan 6, 2023
JohnTitor pushed a commit to JohnTitor/rust that referenced this issue Jan 8, 2023
…errors

remove unreachable error code `E0313`

Fixes rust-lang#103742
Makes rust-lang#103433 redundant

Implements removal of `E0313`. I agree with the linked issue that this error code is unreachable but if someone could confirm that would be great, are crater runs done for this sort of thing?

Also removed a redundant `// ignore-tidy-filelength` that I found while reading code.

cc `@GuillaumeGomez` rust-lang#61137
JohnTitor pushed a commit to JohnTitor/rust that referenced this issue Jan 8, 2023
…errors

remove unreachable error code `E0313`

Fixes rust-lang#103742
Makes rust-lang#103433 redundant

Implements removal of `E0313`. I agree with the linked issue that this error code is unreachable but if someone could confirm that would be great, are crater runs done for this sort of thing?

Also removed a redundant `// ignore-tidy-filelength` that I found while reading code.

cc ``@GuillaumeGomez`` rust-lang#61137
JohnTitor pushed a commit to JohnTitor/rust that referenced this issue Jan 11, 2023
remove E0280

After looking at rust-lang#61137 I tried my hand at E0280. I'm unable to find a reasonable example that emits the error. There are a couple of old examples that compile with the current compiler ([rust-lang#26217](rust-lang#26217), [rust-lang#42114](rust-lang#42114), [rust-lang#27113](rust-lang#27113)) and there is a [bug with chalk](https://github.com/rust-lang/rust/blob/b7cdb635c4b973572307ad288466fba64533369c/src/test/ui/chalkify/bugs/async.rs) that makes it emit the error, with a couple more chalk bugs on zulip.

It seems like the error is supposed to be emitted from unfulfilled where bounds, of which two are related to borrow checking (error in where T: 'a or where 'a: 'b) and thus tend to emit errors like "lifetime may not live long enough" from borrow checking instead. The final case is with type equality constraints (where <T as Iterator>::Item == u32), which is unimplemented ([rust-lang#20041](rust-lang#20041)). That such different problems are supposed to have the same error code also seems strange to me.

Since the error seems to only be emitted when using chalk I propose to remove it and replace it with an ICE instead. A crater run might be warranted.

Pinging `@jackh726` due to removal of chalk test that now ICEs.
Noratrieb added a commit to Noratrieb/rust that referenced this issue Jan 12, 2023
remove unreachable error code `E0490`

AFAIK, the untested and undocumented error code `E0490` is now unreachable, it was from the days of the original borrow checker.

cc `@GuillaumeGomez` rust-lang#61137
Noratrieb added a commit to Noratrieb/rust that referenced this issue Jan 12, 2023
remove unreachable error code `E0490`

AFAIK, the untested and undocumented error code `E0490` is now unreachable, it was from the days of the original borrow checker.

cc ``@GuillaumeGomez`` rust-lang#61137
@Ezrashaw
Copy link
Contributor

@GuillaumeGomez sigh, turns out that E0476 isn't unreachable, I'll have to document it instead.

@GuillaumeGomez
Copy link
Member Author

It's fine. I'll update the list once the new PR is open.

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Jan 19, 2023
…rors

document + UI test `E0208` and make its output more user-friendly

Cleans up `E0208`'s output a lot. It could actually be useful for someone learning about variance now. I also added a UI test for it in `tests/ui/error-codes/` and wrote some docs for it.

r? `@GuillaumeGomez` another error code, can't be bothered to find the issue :P. Obviously there's some compiler stuff, so you'll have to hand it off.

Part of rust-lang#61137.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 6, 2023
…ption-and-test, r=compiler-errors,GuillaumeGomez

Add compiler error E0523 long description and test

This PR is one step towards addressing:  rust-lang#61137.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 7, 2023
…ption-and-test, r=compiler-errors,GuillaumeGomez

Add compiler error E0523 long description and test

This PR is one step towards addressing:  rust-lang#61137.
compiler-errors added a commit to compiler-errors/rust that referenced this issue Feb 25, 2023
…r=GuillaumeGomez

docs/test: add UI test and docs for `E0476`

Final undocumented error code. Not entirely sure about wording in the docs.

Part of rust-lang#61137.

r? `@compiler-errors`

cc `@compiler-errors`
compiler-errors added a commit to compiler-errors/rust that referenced this issue Feb 25, 2023
…r=GuillaumeGomez

docs/test: add UI test and docs for `E0476`

Final undocumented error code. Not entirely sure about wording in the docs.

Part of rust-lang#61137.

r? ``@compiler-errors``

cc ``@compiler-errors``
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 25, 2023
…r=GuillaumeGomez

docs/test: add UI test and docs for `E0476`

Final undocumented error code. Not entirely sure about wording in the docs.

Part of rust-lang#61137.

r? ```@compiler-errors```

cc ```@compiler-errors```
@bors bors closed this as completed in edd27cf Feb 26, 2023
spikespaz pushed a commit to spikespaz/dotwalk-rs that referenced this issue Aug 29, 2024
…e-for-E0311, r=MatthewPeterKelly

Add long description and test for E0311

Adds a long description and unit test for the E0311 compiler error.

Fixes one line-item in rust-lang/rust#61137.
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 D-newcomer-roadblock Diagnostics: Confusing error or lint; hard to understand for new users. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-help-wanted Call for participation: Help is requested to fix this issue. metabug Issues about issues themselves ("bugs about bugs") T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.