summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_middle/src/mir/patch.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_middle/src/mir/patch.rs')
-rw-r--r--compiler/rustc_middle/src/mir/patch.rs15
1 files changed, 5 insertions, 10 deletions
diff --git a/compiler/rustc_middle/src/mir/patch.rs b/compiler/rustc_middle/src/mir/patch.rs
index da486c346..eb4aa9eb9 100644
--- a/compiler/rustc_middle/src/mir/patch.rs
+++ b/compiler/rustc_middle/src/mir/patch.rs
@@ -99,7 +99,9 @@ impl<'tcx> MirPatch<'tcx> {
}
pub fn terminate_block(&mut self, reason: UnwindTerminateReason) -> BasicBlock {
- if let Some((cached_bb, cached_reason)) = self.terminate_block && reason == cached_reason {
+ if let Some((cached_bb, cached_reason)) = self.terminate_block
+ && reason == cached_reason
+ {
return cached_bb;
}
@@ -127,7 +129,7 @@ impl<'tcx> MirPatch<'tcx> {
Location { block: bb, statement_index: offset }
}
- pub fn new_internal_with_info(
+ pub fn new_local_with_info(
&mut self,
ty: Ty<'tcx>,
span: Span,
@@ -135,7 +137,7 @@ impl<'tcx> MirPatch<'tcx> {
) -> Local {
let index = self.next_local;
self.next_local += 1;
- let mut new_decl = LocalDecl::new(ty, span).internal();
+ let mut new_decl = LocalDecl::new(ty, span);
**new_decl.local_info.as_mut().assert_crate_local() = local_info;
self.new_locals.push(new_decl);
Local::new(index)
@@ -148,13 +150,6 @@ impl<'tcx> MirPatch<'tcx> {
Local::new(index)
}
- pub fn new_internal(&mut self, ty: Ty<'tcx>, span: Span) -> Local {
- let index = self.next_local;
- self.next_local += 1;
- self.new_locals.push(LocalDecl::new(ty, span).internal());
- Local::new(index)
- }
-
pub fn new_block(&mut self, data: BasicBlockData<'tcx>) -> BasicBlock {
let block = BasicBlock::new(self.patch_map.len());
debug!("MirPatch: new_block: {:?}: {:?}", block, data);