Make core::nonzero private
It is now an implementation detail of ptr::NonNull and num::NonZero*
This commit is contained in:
parent
2a3f5367a2
commit
ee85bfdcc2
5 changed files with 10 additions and 110 deletions
|
|
@ -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 {}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue