diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-04-17 15:32:42 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-04-21 11:37:43 -0700 |
| commit | eeb94886adccb3f13003f92f117115d17846ce1f (patch) | |
| tree | 2d729b8e48c5022941e2c06e412a2b2a1744ca1c /src/libcore/nonzero.rs | |
| parent | e091ba3f3e8b2b00827ab4934314829b33ffb966 (diff) | |
| download | rust-eeb94886adccb3f13003f92f117115d17846ce1f.tar.gz rust-eeb94886adccb3f13003f92f117115d17846ce1f.zip | |
std: Remove deprecated/unstable num functionality
This commit removes all the old casting/generic traits from `std::num` that are no longer in use by the standard library. This additionally removes the old `strconv` module which has not seen much use in quite a long time. All generic functionality has been supplanted with traits in the `num` crate and the `strconv` module is supplanted with the [rust-strconv crate][rust-strconv]. [rust-strconv]: https://github.com/lifthrasiir/rust-strconv This is a breaking change due to the removal of these deprecated crates, and the alternative crates are listed above. [breaking-change]
Diffstat (limited to 'src/libcore/nonzero.rs')
| -rw-r--r-- | src/libcore/nonzero.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/libcore/nonzero.rs b/src/libcore/nonzero.rs index db2d1b2f1fd..9ea44c39fe9 100644 --- a/src/libcore/nonzero.rs +++ b/src/libcore/nonzero.rs @@ -10,12 +10,17 @@ //! Exposes the NonZero lang item which provides optimization hints. -use marker::{Sized, MarkerTrait}; +use marker::Sized; use ops::Deref; +#[cfg(stage0)] use marker::MarkerTrait; /// Unsafe trait to indicate what types are usable with the NonZero struct -#[allow(deprecated)] -pub unsafe trait Zeroable : MarkerTrait {} +#[cfg(not(stage0))] +pub unsafe trait Zeroable {} + +/// Unsafe trait to indicate what types are usable with the NonZero struct +#[cfg(stage0)] +pub unsafe trait Zeroable: MarkerTrait {} unsafe impl<T:?Sized> Zeroable for *const T {} unsafe impl<T:?Sized> Zeroable for *mut T {} |
