diff options
| author | Laurențiu Nicola <lnicola@dend.ro> | 2024-10-17 10:04:49 +0300 |
|---|---|---|
| committer | Laurențiu Nicola <lnicola@dend.ro> | 2024-10-17 10:04:49 +0300 |
| commit | 1b7cd2bed6efac6ecbe78e9006a9f60878d4a450 (patch) | |
| tree | ddd444e2cdf64d53dc4d522ca38f1a5e631623a2 /library/core/src/array | |
| parent | aff69ccfb2b7da9374dd47f13e626a980ce8338a (diff) | |
| parent | dd5127615ad626741a1116d022cf784637ac05df (diff) | |
| download | rust-1b7cd2bed6efac6ecbe78e9006a9f60878d4a450.tar.gz rust-1b7cd2bed6efac6ecbe78e9006a9f60878d4a450.zip | |
Merge from rust-lang/rust
Diffstat (limited to 'library/core/src/array')
| -rw-r--r-- | library/core/src/array/ascii.rs | 1 | ||||
| -rw-r--r-- | library/core/src/array/mod.rs | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/library/core/src/array/ascii.rs b/library/core/src/array/ascii.rs index 05797b042ee..e2faef855bc 100644 --- a/library/core/src/array/ascii.rs +++ b/library/core/src/array/ascii.rs @@ -9,7 +9,6 @@ impl<const N: usize> [u8; N] { /// /// ``` /// #![feature(ascii_char)] - /// #![feature(const_option)] /// /// const HEX_DIGITS: [std::ascii::Char; 16] = /// *b"0123456789abcdef".as_ascii().unwrap(); diff --git a/library/core/src/array/mod.rs b/library/core/src/array/mod.rs index 24c42bc85dd..9b28b8b613e 100644 --- a/library/core/src/array/mod.rs +++ b/library/core/src/array/mod.rs @@ -146,7 +146,7 @@ pub const fn from_ref<T>(s: &T) -> &[T; 1] { /// Converts a mutable reference to `T` into a mutable reference to an array of length 1 (without copying). #[stable(feature = "array_from_ref", since = "1.53.0")] -#[rustc_const_unstable(feature = "const_array_from_ref", issue = "90206")] +#[rustc_const_stable(feature = "const_array_from_ref", since = "1.83.0")] pub const fn from_mut<T>(s: &mut T) -> &mut [T; 1] { // SAFETY: Converting `&mut T` to `&mut [T; 1]` is sound. unsafe { &mut *(s as *mut T).cast::<[T; 1]>() } |
