]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs
Change InferCtxtBuilder from enter to build
[rust.git] / compiler / rustc_mir_build / src / thir / pattern / const_to_pat.rs
index d477eb1ffebe5c3a02ad600804c879137e808c09..cf8ae776be969ce8d4812ebe089ed273e229d40f 100644 (file)
@@ -28,10 +28,9 @@ pub(super) fn const_to_pat(
         span: Span,
         mir_structural_match_violation: bool,
     ) -> Box<Pat<'tcx>> {
-        self.tcx.infer_ctxt().enter(|infcx| {
-            let mut convert = ConstToPat::new(self, id, span, infcx);
-            convert.to_pat(cv, mir_structural_match_violation)
-        })
+        let infcx = self.tcx.infer_ctxt().build();
+        let mut convert = ConstToPat::new(self, id, span, infcx);
+        convert.to_pat(cv, mir_structural_match_violation)
     }
 }