

Github stabilize `core::array::{from_ref,from_mut}` in `1.53.0` by WaffleLapkin...
source link: https://github.com/rust-lang/rust/pull/84105
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

I didn't get any response in #77101 (comment), so I figured out I can try opening stabilization pr.
This PR stabilizes following functions:
// core::array pub fn from_ref<T>(s: &T) -> &[T; 1]; pub fn from_mut<T>(s: &mut T) -> &mut [T; 1];
Functions are similar to already stabilized core::slice::{
from_ref
,from_mut
}
and were unstable without any problems/questions for a while now.
resolves #77101
@rustbot modify labels: +T-libs
Recommend
-
12
Macro std::ptr::addr_of_mut1.51.0
-
8
Function std::array::from_mut1.53.0
-
15
Function std::array::from_ref1.53.0
-
6
New issue Stabilize Iterator::map_while #89086
-
5
Copy link Contributor WaffleLapkin ...
-
6
References can be quite confusing, especially with different mutabilities. Indeed, only a third of people in my poll said that they understand what &mut &[T] means! Gro...
-
6
Home Menu On {{mut}} and 2-Way-Binding Chris Garrett...
-
6
Add Iterator::array_chunks (take N+1) #100026 ...
-
2
Conversation Contributor...
-
2
impl get_mut_or_init and get_mut_or_try_init for OnceCell and OnceLock #114788 ...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK