diff options
| author | Ralf Jung <post@ralfj.de> | 2018-09-25 15:07:27 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2018-09-29 09:50:50 +0200 |
| commit | e37d6d37e76a8b2f82eacc8c3f642c4d47093950 (patch) | |
| tree | f95f3a9fd051f0e43893299d5533cba5ad7b144d /src/test/debuginfo | |
| parent | 6622172734a6c456ea85e17b765ad1dbc0e42907 (diff) | |
| download | rust-e37d6d37e76a8b2f82eacc8c3f642c4d47093950.tar.gz rust-e37d6d37e76a8b2f82eacc8c3f642c4d47093950.zip | |
Revert "Auto merge of #53508 - japaric:maybe-uninit, r=RalfJung"
This reverts commit c6e3d7fa3113aaa64602507f39d4627c427742ff, reversing changes made to 4591a245c7eec9f70d668982b1383cd2a6854af5.
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 } |
