diff options
| author | Matthew Jasper <mjjasper1@gmail.com> | 2019-09-17 19:32:40 +0100 |
|---|---|---|
| committer | Matthew Jasper <mjjasper1@gmail.com> | 2019-12-18 20:09:11 +0000 |
| commit | 7b0cc6a439d2cf7a9d6dab5b1df2772488cc80a8 (patch) | |
| tree | 09a9d7bd41c7b609b00df4be3b9ef417a98b22eb | |
| parent | 7081c79b7eed2c5b36674526d00c604b647027a3 (diff) | |
| download | rust-7b0cc6a439d2cf7a9d6dab5b1df2772488cc80a8.tar.gz rust-7b0cc6a439d2cf7a9d6dab5b1df2772488cc80a8.zip | |
Check const-propagation of borrows of unsized places
| -rw-r--r-- | src/test/ui/consts/const-prop-ice3.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/ui/consts/const-prop-ice3.rs b/src/test/ui/consts/const-prop-ice3.rs new file mode 100644 index 00000000000..8ab011661e3 --- /dev/null +++ b/src/test/ui/consts/const-prop-ice3.rs @@ -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; +} |
