Skip to content

Commit 6f6b372

Browse files
committed
Check const-propagation of borrows of unsized places
1 parent e57096d commit 6f6b372

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/test/ui/consts/const-prop-ice3.rs

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// run-pass (ensure that const-prop is run)
2+
3+
struct A<T: ?Sized>(T);
4+
5+
fn main() {
6+
let _x = &(&A([2, 3]) as &A<[i32]>).0 as *const [i32] as *const i32;
7+
}

0 commit comments

Comments
 (0)