Misleading error message on `&mut` function
The following is expected to fail right now. But the error is a little unexpected with a wrong message.
fn mut_fun(x: &mut u8) -> &mut u8 {
todo!()
}
Open this code snippet in the playground
error: [HAX0003] (DirectAndMut) The mutation of this &mut is not allowed here.
--> /nix/store/zwf9ilxjz1kqiphfn0spiwgj63fjyh04-rust-default-1.87.0-nightly-2025-03-29/lib/rustlib/src/rust/library/core/src/macros/mod.rs:890:9
|
890 | $crate::panicking::panic("not yet implemented")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
This issue has been marked as stale due to a lack of activity for 60 days. If you believe this issue is still relevant, please provide an update or comment to keep it open. Otherwise, it will be closed in 7 days.
This issue has been closed due to a lack of activity since being marked as stale. If you believe this issue is still relevant, please reopen it with an update or comment.
Still relevant
Still relevant. Fits into a greater effort to improve diagnostics and error messages.