mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 02:00:00 +03:00
a544b5df98
Fix invalid `mut T` suggestion for `&mut T` in missing lifetime error close: rust-lang/rust#150077 When suggesting to return an owned value instead of a borrowed one, the diagnostic was only removing `&` instead of `&mut `, resulting in invalid syntax like `mut T`. This PR fixes the span calculation to properly cover the entire `&mut ` prefix.