diff options
| author | Alex Burka <alex@alexburka.com> | 2017-09-08 18:26:54 +0000 |
|---|---|---|
| committer | Alex Burka <alex@alexburka.com> | 2017-09-16 15:53:02 +0000 |
| commit | 681e5da61ee3f1251c00c2ec0d93dd23dbf861bc (patch) | |
| tree | a6e75c81f714d9869123ffe5b3c34fbfc05fae61 /src/libcore/nonzero.rs | |
| parent | a12d0d4f6672a9621771433d2f05757f1f79130d (diff) | |
| download | rust-681e5da61ee3f1251c00c2ec0d93dd23dbf861bc.tar.gz rust-681e5da61ee3f1251c00c2ec0d93dd23dbf861bc.zip | |
change #![feature(const_fn)] to specific gates
Diffstat (limited to 'src/libcore/nonzero.rs')
| -rw-r--r-- | src/libcore/nonzero.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libcore/nonzero.rs b/src/libcore/nonzero.rs index 3ff1068b937..f075d825f5d 100644 --- a/src/libcore/nonzero.rs +++ b/src/libcore/nonzero.rs @@ -68,6 +68,10 @@ pub struct NonZero<T: Zeroable>(T); impl<T: Zeroable> NonZero<T> { /// Creates an instance of NonZero with the provided value. /// You must indeed ensure that the value is actually "non-zero". + #[unstable(feature = "nonzero", + reason = "needs an RFC to flesh out the design", + issue = "27730")] + #[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_nonzero_new"))] #[inline] pub const unsafe fn new_unchecked(inner: T) -> Self { NonZero(inner) |
