1
Fork 0

Elide storage markers when elaborating deref projections

This commit is contained in:
Tomasz Miąsko 2022-07-30 00:00:00 +00:00
parent 943a380b37
commit 162bd16352
2 changed files with 7 additions and 22 deletions

View file

@ -68,7 +68,7 @@ impl<'tcx> MirPatch<'tcx> {
Location { block: bb, statement_index: offset }
}
pub fn new_local_with_info(
pub fn new_internal_with_info(
&mut self,
ty: Ty<'tcx>,
span: Span,
@ -76,14 +76,17 @@ impl<'tcx> MirPatch<'tcx> {
) -> Local {
let index = self.next_local;
self.next_local += 1;
let mut new_decl = LocalDecl::new(ty, span);
let mut new_decl = LocalDecl::new(ty, span).internal();
new_decl.local_info = local_info;
self.new_locals.push(new_decl);
Local::new(index as usize)
}
pub fn new_temp(&mut self, ty: Ty<'tcx>, span: Span) -> Local {
self.new_local_with_info(ty, span, None)
let index = self.next_local;
self.next_local += 1;
self.new_locals.push(LocalDecl::new(ty, span));
Local::new(index as usize)
}
pub fn new_internal(&mut self, ty: Ty<'tcx>, span: Span) -> Local {