-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Remove "static item recursion checking" in favor of relying on cycle checks in the query engine #47987
Conversation
LGTM. r? @nikomatsakis for rubber-stamping (in case there's some forgotten odd case here). |
Please update the documentation for E0265 "a static or constant references itself" in the error index.
|
fa0385b
to
a868d49
Compare
src/librustc_passes/diagnostics.rs
Outdated
@@ -129,16 +129,18 @@ Please note that negative impls are only allowed for auto traits. | |||
"##, | |||
|
|||
E0265: r##" | |||
#### Note: this error code is no longer emitted by the compiler. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been removing unused errors entirely before. Is there any reason not to do that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, but E0001 and E0002 are being kept...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're not consistent in doing this. I don't even like error codes at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we usually leave a tombstone. It doesn't matter so much for these older errors, but it's particularly useful if the error is the last one that was made, so that it doesn't get reused.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I too would sort of like to reform error codes somewhat, though I'm not entirely sure to what.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice
src/librustc_passes/diagnostics.rs
Outdated
@@ -129,16 +129,18 @@ Please note that negative impls are only allowed for auto traits. | |||
"##, | |||
|
|||
E0265: r##" | |||
#### Note: this error code is no longer emitted by the compiler. | |||
|
|||
This error indicates that a static or constant references itself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I think we can remove this text, no?
src/test/ui/issue-23302-2.stderr
Outdated
@@ -0,0 +1,15 @@ | |||
error[E0391]: unsupported cyclic reference between types/traits detected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like our message should include consts
. Or maybe just change altogether. Something like "unsupported cyclic dependency detected"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like a good idea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's about time. Maybe not even "unsupported", that always seemed a bit unnecessary.
a868d49
to
46a3f2f
Compare
I removed the unused error message and changed |
@bors r+ |
📌 Commit 46a3f2f has been approved by |
⌛ Testing commit 46a3f2f with merge d6005b3f3e50013a47a4e5269389a1343bba48b3... |
💔 Test failed - status-appveyor |
⌛ Testing commit 46a3f2f with merge 7b6d35cc5bb9a8ff432d0a3e933359a68ed42130... |
💔 Test failed - status-travis |
Looks spurious.... https://travis-ci.org/rust-lang/rust/jobs/343159659#L1009-L1010 |
@bors retry |
Remove "static item recursion checking" in favor of relying on cycle checks in the query engine Tests are changed to use the cycle check error message instead. Some duplicate tests are removed. r? @eddyb
Tests are changed to use the cycle check error message instead. Some duplicate tests are removed.
r? @eddyb