diff options
| -rw-r--r-- | library/core/src/convert/mod.rs | 6 | ||||
| -rw-r--r-- | library/core/src/lib.rs | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/library/core/src/convert/mod.rs b/library/core/src/convert/mod.rs index 1e512af4805..78d37ebac2d 100644 --- a/library/core/src/convert/mod.rs +++ b/library/core/src/convert/mod.rs @@ -532,7 +532,8 @@ where // From implies Into #[stable(feature = "rust1", since = "1.0.0")] -impl<T, U> Into<U> for T +#[rustc_const_unstable(feature = "const_convert", issue = "none")] +impl<T, U> const Into<U> for T where U: From<T>, { @@ -543,7 +544,8 @@ where // From (and thus Into) is reflexive #[stable(feature = "rust1", since = "1.0.0")] -impl<T> From<T> for T { +#[rustc_const_unstable(feature = "const_convert", issue = "none")] +impl<T> const From<T> for T { fn from(t: T) -> T { t } diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs index 265ba9f1bb9..9c4429d320f 100644 --- a/library/core/src/lib.rs +++ b/library/core/src/lib.rs @@ -82,6 +82,7 @@ #![feature(const_float_bits_conv)] #![feature(const_float_classify)] #![feature(const_heap)] +#![feature(const_convert)] #![feature(const_inherent_unchecked_arith)] #![feature(const_int_unchecked_arith)] #![feature(const_intrinsic_copy)] |
