Skip to content

Commit fe3c49f

Browse files
committed
Inline and remove TypeVerifier::new.
It has a single call site.
1 parent 2709dc8 commit fe3c49f

File tree

1 file changed

+1
-8
lines changed
  • compiler/rustc_borrowck/src/type_check

1 file changed

+1
-8
lines changed

Diff for: compiler/rustc_borrowck/src/type_check/mod.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ pub(crate) fn type_check<'a, 'tcx>(
174174

175175
checker.check_user_type_annotations();
176176

177-
let mut verifier = TypeVerifier::new(&mut checker, promoted);
177+
let mut verifier = TypeVerifier { cx: &mut checker, promoted, last_span: body.span };
178178
verifier.visit_body(body);
179179

180180
checker.typeck_mir(body);
@@ -465,13 +465,6 @@ impl<'a, 'b, 'tcx> Visitor<'tcx> for TypeVerifier<'a, 'b, 'tcx> {
465465
}
466466

467467
impl<'a, 'b, 'tcx> TypeVerifier<'a, 'b, 'tcx> {
468-
fn new(
469-
cx: &'a mut TypeChecker<'b, 'tcx>,
470-
promoted: &'b IndexSlice<Promoted, Body<'tcx>>,
471-
) -> Self {
472-
TypeVerifier { promoted, last_span: cx.body.span, cx }
473-
}
474-
475468
fn body(&self) -> &Body<'tcx> {
476469
self.cx.body
477470
}

0 commit comments

Comments
 (0)