summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-14845.rs
blob: d9b20e1f688ffd5ca4a228b0decea73947bc00ec (plain)
1
2
3
4
5
6
7
8
9
10
11
struct X {
    a: [u8; 1]
}

fn main() {
    let x = X { a: [0] };
    let _f = &x.a as *mut u8; //~ ERROR casting

    let local: [u8; 1] = [0];
    let _v = &local as *mut u8; //~ ERROR casting
}