diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-10-01 02:13:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-01 02:13:48 +0200 |
| commit | cc1513b860900f87a1077193f0a1dd4e1beeb577 (patch) | |
| tree | fb545713633b4e35b4fd62ef703e09e9c12f49c4 /src | |
| parent | ffb771bc7988ffb5ba862d2d794246ab0ede747d (diff) | |
| parent | ce6c25da5887dcdb446b56892ace1d2463a743f3 (diff) | |
Rollup merge of #77360 - oli-obk:zst_const_pat_regression, r=RalfJung
References to ZSTs may be at arbitrary aligned addresses fixes #77320 r? @RalfJung
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/match/const_non_normal_zst_ref_pattern.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/match/const_non_normal_zst_ref_pattern.rs b/src/test/ui/match/const_non_normal_zst_ref_pattern.rs new file mode 100644 index 00000000000..a114fafb647 --- /dev/null +++ b/src/test/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, + }; +} |
