Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
717c64e
Silence "skipping const checks" if outside a const context
ecstatic-morse Sep 17, 2019
457c3aa
Add additional `const` tests
ecstatic-morse Sep 17, 2019
e81297d
Add analysis to determine if a local is indirectly mutable
ecstatic-morse Sep 17, 2019
83a3e04
Don't treat locals as mutably borrowed after they're dropped
ecstatic-morse Sep 17, 2019
eec93ca
Copy `Qualif` to start work on new const validator
ecstatic-morse Sep 17, 2019
3a5442a
Remove unnecessary method
ecstatic-morse Sep 17, 2019
c2e121d
Make new qualifs public
ecstatic-morse Sep 17, 2019
48d3843
Add requisite imports and bitset to hold qualifs
ecstatic-morse Sep 17, 2019
3758e38
Remove reference to `Mode::NonConstFn` in qualifs
ecstatic-morse Sep 17, 2019
908dcb8
Control whether a `Qualif` is cleared on move
ecstatic-morse Sep 17, 2019
3698d04
Pass current qualification state in a separate parameter
ecstatic-morse Sep 17, 2019
fc92d3b
Add dataflow-based const validation
ecstatic-morse Sep 17, 2019
c990243
Run new validator in compare mode
ecstatic-morse Sep 17, 2019
670c84d
Fix tests broken by more consistent miri unleashed warnings
ecstatic-morse Sep 17, 2019
27bd849
Correct list of miri-supported operations
ecstatic-morse Sep 20, 2019
f2ff425
Add rationale for `suppress_errors` flag
ecstatic-morse Sep 20, 2019
e296436
Remember to replace ICE with some form of warning
ecstatic-morse Sep 20, 2019
b3e59bb
Move non-const ops into their own module
ecstatic-morse Sep 20, 2019
93ee779
Explain why `visit_terminator` does nothing for `IndirectlyMutableLoc…
ecstatic-morse Sep 20, 2019
bc7928a
Trigger ICE on nightly if validators disagree
ecstatic-morse Sep 24, 2019
406ac2e
Give usage instructions `IndirectlyMutableLocals` docs
ecstatic-morse Sep 25, 2019
2f5ea63
Return a `bool` from `in_any_value_of_ty`
ecstatic-morse Sep 25, 2019
dcecefc
Use conservative, type-based qualifcation for statics
ecstatic-morse Sep 25, 2019
1a14d17
Require `fmt::Debug` to implement `NonConstOp`
ecstatic-morse Sep 25, 2019
713ec15
Share `IndirectlyMutableLocals` results via reference
ecstatic-morse Sep 25, 2019
ff6faab
Add description for every module in `check_consts`
ecstatic-morse Sep 25, 2019
a302055
Mask results from flow-sensitive resolver with `in_any_value_of_ty`
ecstatic-morse Sep 25, 2019
8bfe82b
Correct `IndirectlyMutableLocals` docs
ecstatic-morse Sep 25, 2019
f2e7faf
Revert "Use conservative, type-based qualifcation for statics"
ecstatic-morse Sep 25, 2019
ff4158a
Bless miri unleashed output
ecstatic-morse Sep 25, 2019
0bf1a80
Rename `sty` to `kind`
ecstatic-morse Sep 28, 2019
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use conservative, type-based qualifcation for statics
  • Loading branch information
ecstatic-morse committed Sep 28, 2019
commit dcecefcb712c0fd714013fcdf8499f4d65f220b8
5 changes: 2 additions & 3 deletions src/librustc_mir/transform/check_consts/qualifs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ pub trait Qualif {
/// of the type.
fn in_any_value_of_ty(_cx: &ConstCx<'_, 'tcx>, _ty: Ty<'tcx>) -> bool;

fn in_static(_cx: &ConstCx<'_, 'tcx>, _static: &Static<'tcx>) -> bool {
// FIXME(eddyb) should we do anything here for value properties?
false
fn in_static(cx: &ConstCx<'_, 'tcx>, statik: &Static<'tcx>) -> bool {
Self::in_any_value_of_ty(cx, statik.ty)
}

fn in_projection_structurally(
Expand Down