summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/const-autoderef.rs
blob: 1c836318d32894a4718d65972dd37a0315b7bf7c (plain)
1
2
3
4
5
6
7
8
9
10
11
// run-pass

const A: [u8; 1] = ['h' as u8];
const B: u8 = (&A)[0];
const C: &'static &'static &'static &'static [u8; 1] = & & & &A;
const D: u8 = (&C)[0];

pub fn main() {
    assert_eq!(B, A[0]);
    assert_eq!(D, A[0]);
}