impl AsRef<[T; N]> and AsMut<[T; N]> for [T; N]#129872
impl AsRef<[T; N]> and AsMut<[T; N]> for [T; N]#129872GrigorenkoPV wants to merge 1 commit intorust-lang:masterfrom
AsRef<[T; N]> and AsMut<[T; N]> for [T; N]#129872Conversation
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
I am not on T-libs-api, but I don't believe this implementation carries its weight, for the record. Also, it's almost certainly too late to introduce anything new to edition 2024, especially with such weak justification as a single issue report on the tracker. |
Well, fair enough. I've overestimated this a bit.
From what I can tell, there is an intent to eventually add a blanket But anyways, there seems to be no sense in rushing to get this in 2024 edition and there is quite a bit of time before the next (2027?) one, so I guess I will go through the proper ACP process first, even though it will take quite a while. Thank you for the cool-headed perspective and quick feedback on this! ❤️ |
|
@GrigorenkoPV Yes, AsRef<[T]> for [T; N] exists, but not AsRef<[T; N]> for [T; N], as well for AsMut, which was the reason I opened the ticket linked it the top (and the name of this issue). |
Fixes #129849.
Apparently
.as_ref()is widely used on arrays to mean.as_slice(), so some Edition sorcery similar to #84147 or #124097 is required.TODO
#[rustc_skip_during_method_dispatch(..)].as_slice())