2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2020-09-20 10:22:33 -05:00
|
|
|
|
|
|
|
#![warn(pointer_structural_match)]
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(dead_code)]
|
2018-07-19 21:41:09 -05:00
|
|
|
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 => {}
|
|
|
|
_ => {}
|
|
|
|
}
|
|
|
|
}
|