Make core::nonzero private

It is now an implementation detail of ptr::NonNull and num::NonZero*
This commit is contained in:
Simon Sapin 2018-02-16 11:33:22 +01:00
parent 2a3f5367a2
commit ee85bfdcc2
5 changed files with 10 additions and 110 deletions

View file

@ -10,11 +10,10 @@
// https://github.com/rust-lang/rust/issues/41898
#![feature(nonzero, const_fn)]
extern crate core;
use core::nonzero::NonZero;
#![feature(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 {}
}