diff options
Diffstat (limited to 'src/libcore/nonzero.rs')
| -rw-r--r-- | src/libcore/nonzero.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libcore/nonzero.rs b/src/libcore/nonzero.rs index 13b6468105d..59819fd500d 100644 --- a/src/libcore/nonzero.rs +++ b/src/libcore/nonzero.rs @@ -12,6 +12,8 @@ use marker::Sized; use ops::Deref; +#[cfg(not(stage0))] +use ops::CoerceUnsized; /// Unsafe trait to indicate what types are usable with the NonZero struct pub unsafe trait Zeroable {} @@ -54,3 +56,6 @@ impl<T: Zeroable> Deref for NonZero<T> { inner } } + +#[cfg(not(stage0))] +impl<T: Zeroable+CoerceUnsized<U>, U: Zeroable> CoerceUnsized<NonZero<U>> for NonZero<T> {} |
