Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Filter and test predicates using
normalize_and_test_predicates
for const-prop #68297Filter and test predicates using
normalize_and_test_predicates
for const-prop #68297Changes from all commits
d088d8a
171fe82
c431cd7
3fef3d8
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
why call the function and not the query here?
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 didn't realize this was a query, lol.
EDIT: This isn't a query. Did you want me to query-ify this?
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.
well there's substitute_normalize_and_test_predicates which you used before.
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.
@oli-obk: That would use all of the predicates, which I needed to filter beforehand.
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.
Oh... sorry for not reading the docs properly. You're totally right. Let's merge this PR for now and experiment with making it a query separately. Such a query could share a lot of evaluation time between the predicate elaborations of completely independent definitions if they have the same predicate list.
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.
The overflow only happens if the current crate is a library. It does not happen if it's a binary crate (containing a main function). That means this test tests something different.
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.
Passing
--emit=mir
causes the issue to occur for a binary crate, since it forcesoptimized_mir
(and therefore const-prop) to get run on the 'bad' function.You can verify this locally with
rustc +nightly src/test/ui/consts/issue-68264-overflow.rs --emit=mir