about summary refs log tree commit diff
path: root/compiler/rustc_mir_build/src/build/scope.rs
diff options
context:
space:
mode:
authorBoxy <supbscripter@gmail.com>2023-07-05 20:13:26 +0100
committerBoxy <supbscripter@gmail.com>2023-07-05 20:27:07 +0100
commit12138b8e5e840b7446a0893e3cb02a9c05095930 (patch)
tree104af99223147b76006788d1da84cd9a8b378a9e /compiler/rustc_mir_build/src/build/scope.rs
parent5dac6b320be868f898a3c753934eabc79ff2e406 (diff)
downloadrust-12138b8e5e840b7446a0893e3cb02a9c05095930.tar.gz
rust-12138b8e5e840b7446a0893e3cb02a9c05095930.zip
Move `TyCtxt::mk_x` to `Ty::new_x` where applicable
Diffstat (limited to 'compiler/rustc_mir_build/src/build/scope.rs')
-rw-r--r--compiler/rustc_mir_build/src/build/scope.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_mir_build/src/build/scope.rs b/compiler/rustc_mir_build/src/build/scope.rs
index 7c0fbc6f81c..72374102c8c 100644
--- a/compiler/rustc_mir_build/src/build/scope.rs
+++ b/compiler/rustc_mir_build/src/build/scope.rs
@@ -91,6 +91,7 @@ use rustc_middle::middle::region;
 use rustc_middle::mir::*;
 use rustc_middle::thir::{Expr, LintLevel};
 
+use rustc_middle::ty::Ty;
 use rustc_span::{Span, DUMMY_SP};
 
 #[derive(Debug)]
@@ -724,7 +725,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
     // Add a dummy `Assign` statement to the CFG, with the span for the source code's `continue`
     // statement.
     fn add_dummy_assignment(&mut self, span: Span, block: BasicBlock, source_info: SourceInfo) {
-        let local_decl = LocalDecl::new(self.tcx.mk_unit(), span).internal();
+        let local_decl = LocalDecl::new(Ty::new_unit(self.tcx), span).internal();
         let temp_place = Place::from(self.local_decls.push(local_decl));
         self.cfg.push_assign_unit(block, source_info, temp_place, self.tcx);
     }