summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/issue-34784.rs
blob: 98d943470a7f9ac05aa3e31abd1997fca5e3b7a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// run-pass

#![warn(pointer_structural_match)]
#![allow(dead_code)]
const C: *const u8 = &0;

fn foo(x: *const u8) {
    match x {
        C => {}
        _ => {}
    }
}

const D: *const [u8; 4] = b"abcd";

fn main() {
    match D {
        D => {}
        _ => {}
    }
}