-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Implement dataflow-based const validation #64470
Implement dataflow-based const validation #64470
Commits on Sep 28, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 717c64e - Browse repository at this point
Copy the full SHA 717c64eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 457c3aa - Browse repository at this point
Copy the full SHA 457c3aaView commit details -
Add analysis to determine if a local is indirectly mutable
This adds a dataflow analysis that determines if a reference to a given `Local` or part of a `Local` that would allow mutation exists before a point in the CFG. If no such reference exists, we know for sure that that `Local` cannot have been mutated via an indirect assignment or function call.
Configuration menu - View commit details
-
Copy full SHA for e81297d - Browse repository at this point
Copy the full SHA e81297dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 83a3e04 - Browse repository at this point
Copy the full SHA 83a3e04View commit details -
Copy
Qualif
to start work on new const validatorThis is an exact copy of the `Qualif` trait from `qualify_consts.rs` and its first two implementers, `HasMutInterior` and `NeedsDrop`.
Configuration menu - View commit details
-
Copy full SHA for eec93ca - Browse repository at this point
Copy the full SHA eec93caView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3a5442a - Browse repository at this point
Copy the full SHA 3a5442aView commit details -
Configuration menu - View commit details
-
Copy full SHA for c2e121d - Browse repository at this point
Copy the full SHA c2e121dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 48d3843 - Browse repository at this point
Copy the full SHA 48d3843View commit details -
Remove reference to
Mode::NonConstFn
in qualifsThis should have no effect on behavior since the validator is never run in const contexts.
Configuration menu - View commit details
-
Copy full SHA for 3758e38 - Browse repository at this point
Copy the full SHA 3758e38View commit details -
Configuration menu - View commit details
-
Copy full SHA for 908dcb8 - Browse repository at this point
Copy the full SHA 908dcb8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3698d04 - Browse repository at this point
Copy the full SHA 3698d04View commit details -
Configuration menu - View commit details
-
Copy full SHA for fc92d3b - Browse repository at this point
Copy the full SHA fc92d3bView commit details -
Configuration menu - View commit details
-
Copy full SHA for c990243 - Browse repository at this point
Copy the full SHA c990243View commit details -
Configuration menu - View commit details
-
Copy full SHA for 670c84d - Browse repository at this point
Copy the full SHA 670c84dView commit details -
Correct list of miri-supported operations
Heap allocations are out, indirect `fn` calls are in!
Configuration menu - View commit details
-
Copy full SHA for 27bd849 - Browse repository at this point
Copy the full SHA 27bd849View commit details -
Configuration menu - View commit details
-
Copy full SHA for f2ff425 - Browse repository at this point
Copy the full SHA f2ff425View commit details -
Configuration menu - View commit details
-
Copy full SHA for e296436 - Browse repository at this point
Copy the full SHA e296436View commit details -
Configuration menu - View commit details
-
Copy full SHA for b3e59bb - Browse repository at this point
Copy the full SHA b3e59bbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 93ee779 - Browse repository at this point
Copy the full SHA 93ee779View commit details -
Trigger ICE on nightly if validators disagree
Also adds an unstable flag to disable the ICE (`-Zsuppress-const-validation-back-compat-ice`) so that nightly users do not have to revert to a previous nightly if their code causes disagreement between the validators.
Configuration menu - View commit details
-
Copy full SHA for bc7928a - Browse repository at this point
Copy the full SHA bc7928aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 406ac2e - Browse repository at this point
Copy the full SHA 406ac2eView commit details -
Return a
bool
fromin_any_value_of_ty
The `Option` was only used for the promotion qualifiers, so we can use a simpler API for validation.
Configuration menu - View commit details
-
Copy full SHA for 2f5ea63 - Browse repository at this point
Copy the full SHA 2f5ea63View commit details -
Configuration menu - View commit details
-
Copy full SHA for dcecefc - Browse repository at this point
Copy the full SHA dcecefcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1a14d17 - Browse repository at this point
Copy the full SHA 1a14d17View commit details -
Configuration menu - View commit details
-
Copy full SHA for 713ec15 - Browse repository at this point
Copy the full SHA 713ec15View commit details -
Configuration menu - View commit details
-
Copy full SHA for ff6faab - Browse repository at this point
Copy the full SHA ff6faabView commit details -
Mask results from flow-sensitive resolver with
in_any_value_of_ty
We relied previously on the caller (e.g. `Q::in_operand`) to ignore `Local`s that were indirectly mutable (and thus assumed to be qualified). However, it's much clearer (and more efficient) to do this in the resolver itself. This does not yet remove the masking done in `Q::in_operand` and others for safety's sake, although I believe that should now be possible.
Configuration menu - View commit details
-
Copy full SHA for a302055 - Browse repository at this point
Copy the full SHA a302055View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8bfe82b - Browse repository at this point
Copy the full SHA 8bfe82bView commit details -
Revert "Use conservative, type-based qualifcation for statics"
This reverts commit ac7a343cef8287427a98b9210cdb1a772486be10.
Configuration menu - View commit details
-
Copy full SHA for f2e7faf - Browse repository at this point
Copy the full SHA f2e7fafView commit details -
Configuration menu - View commit details
-
Copy full SHA for ff4158a - Browse repository at this point
Copy the full SHA ff4158aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0bf1a80 - Browse repository at this point
Copy the full SHA 0bf1a80View commit details