diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2023-09-28 17:05:52 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2023-09-28 17:05:52 +0000 |
| commit | 255ca184541d9f411cadfc3306ef4f6435ac4eb9 (patch) | |
| tree | 0a68e0bfd7159ed6c542aa5b019b3981762d247b | |
| parent | dd91aba2fdd8e3b6d9248a401bd6eb2f8d445cdf (diff) | |
| download | rust-255ca184541d9f411cadfc3306ef4f6435ac4eb9.tar.gz rust-255ca184541d9f411cadfc3306ef4f6435ac4eb9.zip | |
Add test for 116212.
| -rw-r--r-- | tests/mir-opt/ssa_unreachable_116212.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/mir-opt/ssa_unreachable_116212.rs b/tests/mir-opt/ssa_unreachable_116212.rs new file mode 100644 index 00000000000..f588665876c --- /dev/null +++ b/tests/mir-opt/ssa_unreachable_116212.rs @@ -0,0 +1,14 @@ +// Regression test for issue #116212. + +#![feature(never_type)] + +use std::mem::MaybeUninit; + +struct Foo { + x: u8, + y: !, +} + +fn main() { + let foo = unsafe { MaybeUninit::<Foo>::uninit().assume_init() }; +} |
