1
Fork 0

create localdecl and add span to it

This commit is contained in:
ouz-a 2023-09-30 16:40:15 +03:00
parent 5282e5e120
commit 9130484db9
2 changed files with 15 additions and 2 deletions

View file

@ -106,7 +106,14 @@ impl<'tcx> Context for Tables<'tcx> {
.collect(),
})
.collect(),
locals: mir.local_decls.iter().map(|decl| self.intern_ty(decl.ty)).collect(),
locals: mir
.local_decls
.iter()
.map(|decl| stable_mir::mir::LocalDecl {
ty: self.intern_ty(decl.ty),
span: decl.source_info.span.stable(self),
})
.collect(),
}
}