-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
A-diagnosticsdiagnostics / error reportingdiagnostics / error reportingA-mirC-bugCategory: bugCategory: bug
Description
The following code compiles fine (playground link) but rust-analyzer thinks it's moving a [u32]
out of a reference (E0507):
fn foo(mut slice: &[u32]) -> usize {
slice = match slice {
[0, rest @ ..] | rest => rest,
};
slice.len()
}
rust-analyzer version: 0.3.1697-standalone
rustc version: rustc 1.73.0 (cc66ad468 2023-10-03)
relevant settings: "rust-analyzer.diagnostics.enable": true, "rust-analyzer.diagnostics.experimental.enable": true
Metadata
Metadata
Assignees
Labels
A-diagnosticsdiagnostics / error reportingdiagnostics / error reportingA-mirC-bugCategory: bugCategory: bug