Closed
Description
pub fn f<T>(a: &T) -> *const T {
let b: &*const T = &(a as *const T);
*b
}
--- mir_dump/a.f.005-003.InstCombine.before.mir
+++ mir_dump/a.f.005-003.InstCombine.after.mir
@@ -1,2 +1,2 @@
-// MIR for `f` before InstCombine
+// MIR for `f` after InstCombine
@@ -18,5 +18,5 @@
_3 = &_4; // scope 0 at a.rs:2:24: 2:40
- _2 = &(*_3); // scope 0 at a.rs:2:24: 2:40
+ _2 = _3; // scope 0 at a.rs:2:24: 2:40
StorageDead(_3); // scope 0 at a.rs:2:40: 2:41
- _0 = (*_2); // scope 1 at a.rs:3:5: 3:7
+ _0 = (*_3); // scope 1 at a.rs:3:5: 3:7
StorageDead(_4); // scope 0 at a.rs:4:1: 4:2