diff options
| author | Aïssata <aimaiga2@gmail.com> | 2022-07-25 13:54:49 +0000 |
|---|---|---|
| committer | Aïssata <aimaiga2@gmail.com> | 2022-07-25 13:54:49 +0000 |
| commit | e6518296dcd9e878ac450afdfee4f4bc3fec72f3 (patch) | |
| tree | 0707a1d01f47276a16cae01fb87030b50f5027c6 /compiler/rustc_mir_transform/src/const_prop.rs | |
| parent | 68b433a089deff105063feaad598a1635615eb1a (diff) | |
| download | rust-e6518296dcd9e878ac450afdfee4f4bc3fec72f3.tar.gz rust-e6518296dcd9e878ac450afdfee4f4bc3fec72f3.zip | |
removed CanConstProp + Visitor
Diffstat (limited to 'compiler/rustc_mir_transform/src/const_prop.rs')
| -rw-r--r-- | compiler/rustc_mir_transform/src/const_prop.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_mir_transform/src/const_prop.rs b/compiler/rustc_mir_transform/src/const_prop.rs index a756f1d8f40..85ad6b8f2fe 100644 --- a/compiler/rustc_mir_transform/src/const_prop.rs +++ b/compiler/rustc_mir_transform/src/const_prop.rs @@ -828,7 +828,7 @@ pub enum ConstPropMode { NoPropagation, } -struct CanConstProp { +pub struct CanConstProp { can_const_prop: IndexVec<Local, ConstPropMode>, // False at the beginning. Once set, no more assignments are allowed to that local. found_assignment: BitSet<Local>, @@ -838,7 +838,7 @@ struct CanConstProp { impl CanConstProp { /// Returns true if `local` can be propagated - fn check<'tcx>( + pub fn check<'tcx>( tcx: TyCtxt<'tcx>, param_env: ParamEnv<'tcx>, body: &Body<'tcx>, |
