-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Ignore unsopported constant expr
error
#46570
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @pnkfelix (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
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.
You can write fixes
instead of addresses
, then github will automatically close the issue when the PR is merged
src/test/run-pass/issue-46553.rs
Outdated
// except according to those terms. | ||
|
||
#![feature(const_fn)] | ||
#![warn(const_err)] |
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.
This should be deny, because otherwise the test won't fail if the warning is reintroduced
From what I understand (quoting what was mentioned in IRC), 'the real issue is that rustc has two const evaluators. One for stuff like array lengths, and one for everything else. You are seeing a warning from the first one, but the second one processes this just fine.' Is suppressing the error like this properly handling the issue? Edit: Just realized that's quoting @oli-obk, who reviewed this PR. Are those comments still relevant? |
review ping for you @pnkfelix ! |
r? @eddyb |
LGTM. @bors delegate=oli-obk |
✌️ @oli-obk can now approve this pull request |
Yea suppressing this seems fine to me, since the lint is meant to report const eval failures early. Implementation deficiencies in the hir const evaluator could be fixed, but it would be wasted work with miri being so close. @bors r+ |
📌 Commit cbd25ed has been approved by |
Ignore `unsopported constant expr` error Fixes #46553
☀️ Test successful - status-appveyor, status-travis |
Fixes #46553