diff options
| author | Ralf Jung <post@ralfj.de> | 2021-07-24 13:27:17 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2021-07-24 13:27:17 +0200 |
| commit | 83bc657e254cc3e35ca704864c17abac6d618e18 (patch) | |
| tree | badb44f1b0e1747581de0908e3b6c469de89f194 | |
| parent | 35d4d4ca149c8aa8ed2eca221a56612d35b6c7f9 (diff) | |
| download | rust-83bc657e254cc3e35ca704864c17abac6d618e18.tar.gz rust-83bc657e254cc3e35ca704864c17abac6d618e18.zip | |
rename Validator → Checker
| -rw-r--r-- | compiler/rustc_mir/src/transform/check_consts/check.rs | 10 | ||||
| -rw-r--r-- | compiler/rustc_mir/src/transform/mod.rs | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_mir/src/transform/check_consts/check.rs b/compiler/rustc_mir/src/transform/check_consts/check.rs index cfc538ef500..cff386f776b 100644 --- a/compiler/rustc_mir/src/transform/check_consts/check.rs +++ b/compiler/rustc_mir/src/transform/check_consts/check.rs @@ -180,7 +180,7 @@ impl Qualifs<'mir, 'tcx> { } } -pub struct Validator<'mir, 'tcx> { +pub struct Checker<'mir, 'tcx> { ccx: &'mir ConstCx<'mir, 'tcx>, qualifs: Qualifs<'mir, 'tcx>, @@ -194,7 +194,7 @@ pub struct Validator<'mir, 'tcx> { secondary_errors: Vec<Diagnostic>, } -impl Deref for Validator<'mir, 'tcx> { +impl Deref for Checker<'mir, 'tcx> { type Target = ConstCx<'mir, 'tcx>; fn deref(&self) -> &Self::Target { @@ -202,9 +202,9 @@ impl Deref for Validator<'mir, 'tcx> { } } -impl Validator<'mir, 'tcx> { +impl Checker<'mir, 'tcx> { pub fn new(ccx: &'mir ConstCx<'mir, 'tcx>) -> Self { - Validator { + Checker { span: ccx.body.span, ccx, qualifs: Default::default(), @@ -477,7 +477,7 @@ impl Validator<'mir, 'tcx> { } } -impl Visitor<'tcx> for Validator<'mir, 'tcx> { +impl Visitor<'tcx> for Checker<'mir, 'tcx> { fn visit_basic_block_data(&mut self, bb: BasicBlock, block: &BasicBlockData<'tcx>) { trace!("visit_basic_block_data: bb={:?} is_cleanup={:?}", bb, block.is_cleanup); diff --git a/compiler/rustc_mir/src/transform/mod.rs b/compiler/rustc_mir/src/transform/mod.rs index 9da2660dbad..dbf12e6d76f 100644 --- a/compiler/rustc_mir/src/transform/mod.rs +++ b/compiler/rustc_mir/src/transform/mod.rs @@ -240,7 +240,7 @@ fn mir_const_qualif(tcx: TyCtxt<'_>, def: ty::WithOptConstParam<LocalDefId>) -> let ccx = check_consts::ConstCx { body, tcx, const_kind, param_env: tcx.param_env(def.did) }; - let mut validator = check_consts::check::Validator::new(&ccx); + let mut validator = check_consts::check::Checker::new(&ccx); validator.check_body(); // We return the qualifs in the return place for every MIR body, even though it is only used |
