Commit 9130484 1 parent 5282e5e commit 9130484 Copy full SHA for 9130484
File tree 2 files changed +15
-2
lines changed
rustc_smir/src/rustc_smir
2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,14 @@ impl<'tcx> Context for Tables<'tcx> {
106
106
. collect ( ) ,
107
107
} )
108
108
. collect ( ) ,
109
- locals : mir. local_decls . iter ( ) . map ( |decl| self . intern_ty ( decl. ty ) ) . collect ( ) ,
109
+ locals : mir
110
+ . local_decls
111
+ . iter ( )
112
+ . map ( |decl| stable_mir:: mir:: LocalDecl {
113
+ ty : self . intern_ty ( decl. ty ) ,
114
+ span : decl. source_info . span . stable ( self ) ,
115
+ } )
116
+ . collect ( ) ,
110
117
}
111
118
}
112
119
Original file line number Diff line number Diff line change @@ -5,7 +5,13 @@ use crate::{ty::Ty, Span};
5
5
#[ derive( Clone , Debug ) ]
6
6
pub struct Body {
7
7
pub blocks : Vec < BasicBlock > ,
8
- pub locals : Vec < Ty > ,
8
+ pub locals : Vec < LocalDecl > ,
9
+ }
10
+
11
+ #[ derive( Clone , Debug ) ]
12
+ pub struct LocalDecl {
13
+ pub ty : Ty ,
14
+ pub span : Span ,
9
15
}
10
16
11
17
#[ derive( Clone , Debug ) ]
You can’t perform that action at this time.
0 commit comments