diff options
Diffstat (limited to 'tests/ui/match/const_non_normal_zst_ref_pattern.rs')
-rw-r--r-- | tests/ui/match/const_non_normal_zst_ref_pattern.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/match/const_non_normal_zst_ref_pattern.rs b/tests/ui/match/const_non_normal_zst_ref_pattern.rs new file mode 100644 index 000000000..a114fafb6 --- /dev/null +++ b/tests/ui/match/const_non_normal_zst_ref_pattern.rs @@ -0,0 +1,9 @@ +// check-pass + +const FOO: isize = 10; +const ZST: &() = unsafe { std::mem::transmute(FOO) }; +fn main() { + match &() { + ZST => 9, + }; +} |