Add documentation for error E0208#98011
Conversation
|
Some changes occurred in diagnostic error codes |
|
r? @lcnr (rust-highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
There is really nothing more to be explained about this error code?
There was a problem hiding this comment.
Thanks for your feedback. What else should be explained about this error code?
There was a problem hiding this comment.
Try to adopt this point of view: you don't know what this error code is about at all. What information does the reader need to understand why they got this error?
In the current case, you only show a table of variance, but that's far from enough to understand what's going on in here.
There was a problem hiding this comment.
Thanks. A link to the following page would be enough? https://doc.rust-lang.org/nomicon/subtyping.html
There was a problem hiding this comment.
I have just realized it's already there
There was a problem hiding this comment.
I felt the link to the documentation was enough @mbartlett21 What else can I add here?
This comment has been minimized.
This comment has been minimized.
@GuillaumeGomez Can you explain why this failed, please? A similar sentence ("For more information...") was added in the following PR but it worked there #94449 |
compiler-errors
left a comment
There was a problem hiding this comment.
I don't think that an internal error needs error documentation.
The feature gate specifically says "the #[rustc_error] attribute is just used for rustc unit tests and will never be stable", and I don't think people working within the compiler need this documentation.
I prepared this PR because this error code is mentioned here #61137 (comment) |
|
@GuillaumeGomez, perhaps that one should also be marked off the list as unneeded? Edit: Same for E0640, E0711, E0717 |
|
I made the list based on the undocumented error codes but didn't make difference with internal ones. We can just add a comment like |
Inside |
|
Yes. Something like this: E0208, // internal error code |
557221e to
99672fb
Compare
Done |
|
Thanks! @bors r+ rollup |
|
📌 Commit 99672fb has been approved by |
…piler-errors Rollup of 3 pull requests Successful merges: - rust-lang#97920 (Fix some test annotations) - rust-lang#97950 (Clarify `#[derive(PartialEq)]` on enums) - rust-lang#98011 (Add documentation for error E0208) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Related to #61137