File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
src/test/mir-opt/const_prop Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ #[ inline( never) ]
2+ fn read ( _: usize ) { }
3+
4+ fn main ( ) {
5+ const FOO : & i32 = & 1 ;
6+ let x = FOO as * const i32 as usize ;
7+ read ( x) ;
8+ }
9+
10+ // END RUST SOURCE
11+ // START rustc.main.ConstProp.before.mir
12+ // bb0: {
13+ // ...
14+ // _3 = _4;
15+ // _2 = move _3 as *const i32 (Misc);
16+ // ...
17+ // _1 = move _2 as usize (Misc);
18+ // ...
19+ // _6 = _1;
20+ // _5 = const read(move _6) -> bb1;
21+ // }
22+ // END rustc.main.ConstProp.before.mir
23+ // START rustc.main.ConstProp.after.mir
24+ // bb0: {
25+ // ...
26+ // _3 = _4;
27+ // _2 = move _3 as *const i32 (Misc);
28+ // ...
29+ // _1 = move _2 as usize (Misc);
30+ // ...
31+ // _6 = _1;
32+ // _5 = const read(move _6) -> bb1;
33+ // }
34+ // END rustc.main.ConstProp.after.mir
You can’t perform that action at this time.
0 commit comments