diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-10-29 15:16:31 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-11-19 11:33:48 +1100 |
| commit | fe3c49fe9a2249b5c0e4aaa2941ce82ad993eba4 (patch) | |
| tree | 62e2f5134004e5243f85976c30b7065e413e1a03 | |
| parent | 2709dc8a138c23390992ce53275113be6e2db208 (diff) | |
| download | rust-fe3c49fe9a2249b5c0e4aaa2941ce82ad993eba4.tar.gz rust-fe3c49fe9a2249b5c0e4aaa2941ce82ad993eba4.zip | |
Inline and remove `TypeVerifier::new`.
It has a single call site.
| -rw-r--r-- | compiler/rustc_borrowck/src/type_check/mod.rs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/compiler/rustc_borrowck/src/type_check/mod.rs b/compiler/rustc_borrowck/src/type_check/mod.rs index bbf11722658..207066b5044 100644 --- a/compiler/rustc_borrowck/src/type_check/mod.rs +++ b/compiler/rustc_borrowck/src/type_check/mod.rs @@ -174,7 +174,7 @@ pub(crate) fn type_check<'a, 'tcx>( checker.check_user_type_annotations(); - let mut verifier = TypeVerifier::new(&mut checker, promoted); + let mut verifier = TypeVerifier { cx: &mut checker, promoted, last_span: body.span }; verifier.visit_body(body); checker.typeck_mir(body); @@ -465,13 +465,6 @@ impl<'a, 'b, 'tcx> Visitor<'tcx> for TypeVerifier<'a, 'b, 'tcx> { } impl<'a, 'b, 'tcx> TypeVerifier<'a, 'b, 'tcx> { - fn new( - cx: &'a mut TypeChecker<'b, 'tcx>, - promoted: &'b IndexSlice<Promoted, Body<'tcx>>, - ) -> Self { - TypeVerifier { promoted, last_span: cx.body.span, cx } - } - fn body(&self) -> &Body<'tcx> { self.cx.body } |
