]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/issue-34784.rs
Rollup merge of #106699 - eholk:await-chains-drop-tracking, r=wesleywiser
[rust.git] / tests / ui / consts / issue-34784.rs
1 // run-pass
2
3 #![warn(pointer_structural_match)]
4 #![allow(dead_code)]
5 const C: *const u8 = &0;
6
7 fn foo(x: *const u8) {
8     match x {
9         C => {}
10         _ => {}
11     }
12 }
13
14 const D: *const [u8; 4] = b"abcd";
15
16 fn main() {
17     match D {
18         D => {}
19         _ => {}
20     }
21 }