Improve the error explanations for check_const#30932
Conversation
src/librustc/diagnostics.rs
Outdated
There was a problem hiding this comment.
"// ..and also"? Isn't "// ... and also" better?
|
Looks like an overall improvement. |
|
improved |
src/librustc/diagnostics.rs
Outdated
There was a problem hiding this comment.
This is wrong. This document already contains various cases of wrong advice.
There was a problem hiding this comment.
If the problem is that you need the value behind a pointer in a static variable, then not putting the value in a static variable does not fix the problem.
There was a problem hiding this comment.
It's not like you can solve the problem.
There was a problem hiding this comment.
I am not sure how important is the "how to fix this" advice, because each issue will have its own fix.
ba50fa0 to
5e16148
Compare
src/librustc/diagnostics.rs
Outdated
There was a problem hiding this comment.
Nit: This paragraph should use inline code for the constant names.
|
r=me once the two nits are fixed. |
5e16148 to
cad3882
Compare
|
fixed ^ |
|
@bors r+ cad3882 |
|
@bors rollup |
|
☔ The latest upstream changes (presumably #31024) made this pull request unmergeable. Please resolve the merge conflicts. |
|
🔒 Merge conflict |
cad3882 to
47593da
Compare
|
@bors r=nagisa rollup |
|
📌 Commit 47593da has been approved by |
Fixes #30705
r? @nagisa