diff options
| author | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2020-09-30 10:40:49 +0200 |
|---|---|---|
| committer | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2020-09-30 10:40:49 +0200 |
| commit | ce6c25da5887dcdb446b56892ace1d2463a743f3 (patch) | |
| tree | e86e8316e07ee51e858fe6ff7600c8aa8e237b43 /src | |
| parent | 4d52dc4790cfaf3f23ff219c9a9932be2bfcd53e (diff) | |
References to ZSTs may be at arbitrary aligned addresses
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, + }; +} |
