Closed
Description
In Rust 2024, the following error message is emitted:
//@ edition: 2024
fn main() {
let [&_x] = &mut [&()];
//~^ ERROR this pattern relies on behavior which may change in edition 2024
//~| ERROR cannot implicitly match against multiple layers of reference
//~| NOTE make the implied reference pattern explicit
}
This message isn't great. The problem isn't really that the behavior may change in Rust 2024, it's that this is simply disallowed (starting in Rust 2024).
We should probably also remove the bit about "implicitly matching against multiple layers of references". If someone is in the Rust 2024 headspace, this isn't necessarily what the person was trying to do in writing this.
Tracking: