diff options
| author | kennytm <kennytm@gmail.com> | 2018-05-17 03:07:52 +0800 |
|---|---|---|
| committer | kennytm <kennytm@gmail.com> | 2018-05-17 05:18:21 +0800 |
| commit | 02aedec72264b76dce679570ea64a799a82ad3ce (patch) | |
| tree | 44ed0959b49bab0611c74b7e0dba49091857fe1b /src/test | |
| parent | 63ea42fd3c82c629a0e5a8b981bdaeb30cdc0253 (diff) | |
| parent | 89d9ca9b50e01cbc5dc78a26f15cc8c435bbc5a4 (diff) | |
| download | rust-02aedec72264b76dce679570ea64a799a82ad3ce.tar.gz rust-02aedec72264b76dce679570ea64a799a82ad3ce.zip | |
Rollup merge of #50808 - SimonSapin:nonzero, r=alexcrichton
Stabilize num::NonZeroU* Tracking issue: https://github.com/rust-lang/rust/issues/49137
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/ctfe/tuple-struct-constructors.rs | 6 | ||||
| -rw-r--r-- | src/test/run-pass/enum-null-pointer-opt.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/print_type_sizes/niche-filling.rs | 1 |
3 files changed, 2 insertions, 7 deletions
diff --git a/src/test/run-pass/ctfe/tuple-struct-constructors.rs b/src/test/run-pass/ctfe/tuple-struct-constructors.rs index ecc5d376636..d5f3e88fd52 100644 --- a/src/test/run-pass/ctfe/tuple-struct-constructors.rs +++ b/src/test/run-pass/ctfe/tuple-struct-constructors.rs @@ -10,11 +10,9 @@ // https://github.com/rust-lang/rust/issues/41898 -#![feature(nonzero, const_fn)] -extern crate core; -use core::nonzero::NonZero; +use std::num::NonZeroU64; fn main() { - const FOO: NonZero<u64> = unsafe { NonZero::new_unchecked(2) }; + const FOO: NonZeroU64 = unsafe { NonZeroU64::new_unchecked(2) }; if let FOO = FOO {} } diff --git a/src/test/run-pass/enum-null-pointer-opt.rs b/src/test/run-pass/enum-null-pointer-opt.rs index 12f17a1575e..34ed589d418 100644 --- a/src/test/run-pass/enum-null-pointer-opt.rs +++ b/src/test/run-pass/enum-null-pointer-opt.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(nonzero, core)] - use std::mem::size_of; use std::num::NonZeroUsize; use std::ptr::NonNull; diff --git a/src/test/ui/print_type_sizes/niche-filling.rs b/src/test/ui/print_type_sizes/niche-filling.rs index 1aad0b760b1..17e7a21cd02 100644 --- a/src/test/ui/print_type_sizes/niche-filling.rs +++ b/src/test/ui/print_type_sizes/niche-filling.rs @@ -22,7 +22,6 @@ // padding and overall computed sizes can be quite different. #![feature(start)] -#![feature(nonzero)] #![allow(dead_code)] use std::num::NonZeroU32; |
