exp-stuff-dirty
This commit is contained in:
parent
0e7915d11f
commit
f1c5f34f76
34 changed files with 65 additions and 141 deletions
|
@ -78,6 +78,15 @@ impl<'tcx> MirPatch<'tcx> {
|
|||
Location { block: bb, statement_index: offset }
|
||||
}
|
||||
|
||||
pub fn new_local_temp(&mut self, ty: Ty<'tcx>, span: Span) -> Local {
|
||||
let index = self.next_local;
|
||||
self.next_local += 1;
|
||||
let mut new_decl = LocalDecl::new(ty, span);
|
||||
new_decl.local_info = Some(Box::new(LocalInfo::Temp));
|
||||
self.new_locals.push(new_decl);
|
||||
Local::new(index as usize)
|
||||
}
|
||||
|
||||
pub fn new_temp(&mut self, ty: Ty<'tcx>, span: Span) -> Local {
|
||||
let index = self.next_local;
|
||||
self.next_local += 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue