We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 45214ed commit b17066dCopy full SHA for b17066d
src/test/mir-opt/const_prop/const_prop_fails_gracefully.rs
@@ -0,0 +1,34 @@
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
25
26
27
28
29
30
31
32
33
34
+// END rustc.main.ConstProp.after.mir
0 commit comments