Check const-propagation of borrows of unsized places
This commit is contained in:
parent
7081c79b7e
commit
7b0cc6a439
1 changed files with 7 additions and 0 deletions
7
src/test/ui/consts/const-prop-ice3.rs
Normal file
7
src/test/ui/consts/const-prop-ice3.rs
Normal file
|
@ -0,0 +1,7 @@
|
|||
// run-pass (ensure that const-prop is run)
|
||||
|
||||
struct A<T: ?Sized>(T);
|
||||
|
||||
fn main() {
|
||||
let _x = &(&A([2, 3]) as &A<[i32]>).0 as *const [i32] as *const i32;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue