]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-region-ptrs-noncopy.rs
Rollup merge of #64603 - gilescope:unused-lifetime-warning, r=matthewjasper
[rust.git] / src / test / ui / consts / const-region-ptrs-noncopy.rs
1 // run-pass
2 #![allow(dead_code)]
3 #![allow(non_upper_case_globals)]
4
5 type Big = [u64; 8];
6 struct Pair<'a> { a: isize, b: &'a Big }
7 const x: &'static Big = &([13, 14, 10, 13, 11, 14, 14, 15]);
8 const y: &'static Pair<'static> = &Pair {a: 15, b: x};
9
10 pub fn main() {
11     assert_eq!(x as *const Big, y.b as *const Big);
12 }