diff options
| author | Michael Bradshaw <mjbshaw@google.com> | 2018-09-29 19:51:09 -0700 |
|---|---|---|
| committer | Michael Bradshaw <mjbshaw@google.com> | 2018-09-29 19:51:09 -0700 |
| commit | 43cc32fbb2506eff0090e894c1e8a46b62a8eb0b (patch) | |
| tree | ac301fe1be819c25d833880da0ab32bf550016eb /src/test/debuginfo | |
| parent | aec5330082a0c4664abf0f6604c1b05768a90234 (diff) | |
| parent | 9653f790333d1270f36f1614e85d8a7b54193e75 (diff) | |
| download | rust-43cc32fbb2506eff0090e894c1e8a46b62a8eb0b.tar.gz rust-43cc32fbb2506eff0090e894c1e8a46b62a8eb0b.zip | |
Merge branch 'master' into drop
Diffstat (limited to 'src/test/debuginfo')
| -rw-r--r-- | src/test/debuginfo/nil-enum.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/test/debuginfo/nil-enum.rs b/src/test/debuginfo/nil-enum.rs index ab9c7e2dd27..94377421c0b 100644 --- a/src/test/debuginfo/nil-enum.rs +++ b/src/test/debuginfo/nil-enum.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// NOTE Instantiating an empty enum is UB. This test may break in the future. - // LLDB can't handle zero-sized values // ignore-lldb @@ -27,11 +25,8 @@ #![allow(unused_variables)] #![feature(omit_gdb_pretty_printer_section)] -#![feature(maybe_uninit)] #![omit_gdb_pretty_printer_section] -use std::mem::MaybeUninit; - enum ANilEnum {} enum AnotherNilEnum {} @@ -40,8 +35,8 @@ enum AnotherNilEnum {} // The error from gdbr is expected since nil enums are not supposed to exist. fn main() { unsafe { - let first: ANilEnum = MaybeUninit::uninitialized().into_inner(); - let second: AnotherNilEnum = MaybeUninit::uninitialized().into_inner(); + let first: ANilEnum = ::std::mem::zeroed(); + let second: AnotherNilEnum = ::std::mem::zeroed(); zzz(); // #break } |
