diff options
| author | Boxy <supbscripter@gmail.com> | 2023-07-05 20:13:26 +0100 |
|---|---|---|
| committer | Boxy <supbscripter@gmail.com> | 2023-07-05 20:27:07 +0100 |
| commit | 12138b8e5e840b7446a0893e3cb02a9c05095930 (patch) | |
| tree | 104af99223147b76006788d1da84cd9a8b378a9e /compiler/rustc_mir_build/src/build/scope.rs | |
| parent | 5dac6b320be868f898a3c753934eabc79ff2e406 (diff) | |
| download | rust-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.rs | 3 |
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); } |
