Wrap the whole LocalInfo in ClearCrossCrate.
This commit is contained in:
parent
2e7034ebf7
commit
bcb161def7
19 changed files with 134 additions and 142 deletions
|
@ -72,12 +72,12 @@ impl<'tcx> MirPatch<'tcx> {
|
|||
&mut self,
|
||||
ty: Ty<'tcx>,
|
||||
span: Span,
|
||||
local_info: Option<Box<LocalInfo<'tcx>>>,
|
||||
local_info: LocalInfo<'tcx>,
|
||||
) -> Local {
|
||||
let index = self.next_local;
|
||||
self.next_local += 1;
|
||||
let mut new_decl = LocalDecl::new(ty, span).internal();
|
||||
new_decl.local_info = local_info;
|
||||
**new_decl.local_info.as_mut().assert_crate_local() = local_info;
|
||||
self.new_locals.push(new_decl);
|
||||
Local::new(index as usize)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue