Rollup merge of #50808 - SimonSapin:nonzero, r=alexcrichton
Stabilize num::NonZeroU* Tracking issue: https://github.com/rust-lang/rust/issues/49137
This commit is contained in:
commit
02aedec722
14 changed files with 18 additions and 150 deletions
|
|
@ -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 {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue