Skip to content

Commit 83bc657

Browse files
committed
rename Validator → Checker
1 parent 35d4d4c commit 83bc657

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

compiler/rustc_mir/src/transform/check_consts/check.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ impl Qualifs<'mir, 'tcx> {
180180
}
181181
}
182182

183-
pub struct Validator<'mir, 'tcx> {
183+
pub struct Checker<'mir, 'tcx> {
184184
ccx: &'mir ConstCx<'mir, 'tcx>,
185185
qualifs: Qualifs<'mir, 'tcx>,
186186

@@ -194,17 +194,17 @@ pub struct Validator<'mir, 'tcx> {
194194
secondary_errors: Vec<Diagnostic>,
195195
}
196196

197-
impl Deref for Validator<'mir, 'tcx> {
197+
impl Deref for Checker<'mir, 'tcx> {
198198
type Target = ConstCx<'mir, 'tcx>;
199199

200200
fn deref(&self) -> &Self::Target {
201201
&self.ccx
202202
}
203203
}
204204

205-
impl Validator<'mir, 'tcx> {
205+
impl Checker<'mir, 'tcx> {
206206
pub fn new(ccx: &'mir ConstCx<'mir, 'tcx>) -> Self {
207-
Validator {
207+
Checker {
208208
span: ccx.body.span,
209209
ccx,
210210
qualifs: Default::default(),
@@ -477,7 +477,7 @@ impl Validator<'mir, 'tcx> {
477477
}
478478
}
479479

480-
impl Visitor<'tcx> for Validator<'mir, 'tcx> {
480+
impl Visitor<'tcx> for Checker<'mir, 'tcx> {
481481
fn visit_basic_block_data(&mut self, bb: BasicBlock, block: &BasicBlockData<'tcx>) {
482482
trace!("visit_basic_block_data: bb={:?} is_cleanup={:?}", bb, block.is_cleanup);
483483

compiler/rustc_mir/src/transform/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ fn mir_const_qualif(tcx: TyCtxt<'_>, def: ty::WithOptConstParam<LocalDefId>) ->
240240

241241
let ccx = check_consts::ConstCx { body, tcx, const_kind, param_env: tcx.param_env(def.did) };
242242

243-
let mut validator = check_consts::check::Validator::new(&ccx);
243+
let mut validator = check_consts::check::Checker::new(&ccx);
244244
validator.check_body();
245245

246246
// We return the qualifs in the return place for every MIR body, even though it is only used

0 commit comments

Comments
 (0)