Improve error message for E0081#97456
Improve error message for E0081#97456bors merged 1 commit intorust-lang:masterfrom Bryysen:issue-97319-fix
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @lcnr (or someone else) soon. Please see the contribution instructions for more information. |
|
Note that this was done by using the (existing) |
|
You probably need to re-bless your test stderr. Did you run |
This comment has been minimized.
This comment has been minimized.
|
Hmm I could have sworn i blessed the tests... strange |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Do you need to |
|
I'm on it. Ended up pulling from origin somehow and now i have to recompile everything locally to make the changes. I have the dream combo of weak laptop + slow connection so everything takes ages 😞 |
|
Moving the note to its own span seems kinda noisy: Could also just remove it all-together |
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
I actually kinda miss that "assigned value that was incremented from the previous value" error... could you add that back? Maybe pointing at the previous value, instead of the current one?
Something like
enum Foo {
A = 1, // first assignment of `0` here
B = 0, //~ assigned value for `C` was incremented from the previous value
C,|
@Bryysen, let's go with #97456 (comment). |
compiler-errors
left a comment
There was a problem hiding this comment.
two tiny nitpicks, then we're good to go!
This comment has been minimized.
This comment has been minimized.
Previously whenever a duplicate discriminant was detected for an Enum, we would print the discriminant bits in the diagnostic without any casting. This caused us to display incorrect values for negative discriminants. After this PR we format the discriminant signedness correctly. Also reworded some of the original error messages.
compiler-errors
left a comment
There was a problem hiding this comment.
Wonderful, thanks for dealing with the back-and-forth of my comments. I will approve as soon as CI is green.
|
@bors r+ rollup |
|
📌 Commit f671bc9 has been approved by |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (abc7681): comparison url. Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
Closes #97319