-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Add a HIR pass to check consts for if
, loop
, etc.
#66170
Merged
Merged
+784
−357
Commits on Nov 13, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 8b7d2bc - Browse repository at this point
Copy the full SHA 8b7d2bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 33b62be - Browse repository at this point
Copy the full SHA 33b62beView commit details -
Add HIR pass to check for
if
s andloop
s in aconst
These high-level constructs get mapped to control-flow primitives by the time the MIR const-checker runs, making it hard to get the span for the erroneous expression.
Configuration menu - View commit details
-
Copy full SHA for 3a84efd - Browse repository at this point
Copy the full SHA 3a84efdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 267733b - Browse repository at this point
Copy the full SHA 267733bView commit details -
Remove if/loop tests from min_const_fn
These errors will be triggered before the MIR const-checker runs, causing all other errors to be silenced. They are now checked in the `const-{if,loop}` tests.
Configuration menu - View commit details
-
Copy full SHA for 92386e8 - Browse repository at this point
Copy the full SHA 92386e8View commit details -
Extend const-loop and const-if to handle more cases
This makes sure that our HIR visitor is visiting as many const-items as possible.
Configuration menu - View commit details
-
Copy full SHA for 67336bb - Browse repository at this point
Copy the full SHA 67336bbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3ce8ca4 - Browse repository at this point
Copy the full SHA 3ce8ca4View commit details -
This PR BREAKS CODE THAT WAS ACCEPTED ON STABLE. It's arguably a bug that this was accepted in the first place, but here we are. See rust-lang#62272 for more info.
Configuration menu - View commit details
-
Copy full SHA for 281e898 - Browse repository at this point
Copy the full SHA 281e898View commit details -
Configuration menu - View commit details
-
Copy full SHA for eff83e5 - Browse repository at this point
Copy the full SHA eff83e5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0123cbd - Browse repository at this point
Copy the full SHA 0123cbdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 70aa781 - Browse repository at this point
Copy the full SHA 70aa781View commit details -
Bless less verbose error messages
The MIR const-checker errors for if/match/loop are now delay span bugs, so nothing will be emitted unless the HIR checker misses something.
Configuration menu - View commit details
-
Copy full SHA for 86734b1 - Browse repository at this point
Copy the full SHA 86734b1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5e048da - Browse repository at this point
Copy the full SHA 5e048daView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7552bd6 - Browse repository at this point
Copy the full SHA 7552bd6View commit details
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.