removed CanConstProp + Visitor

This commit is contained in:
Aïssata
2022-07-25 13:54:49 +00:00
parent 68b433a089
commit e6518296dc
2 changed files with 7 additions and 125 deletions

View File

@@ -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>,