Auto merge of #86815 - FabianWolff:issue-84210, r=varkor
Improve error reporting for modifications behind `&` references I had a look at #84210 and noticed that #85823 has effectively already fixed #84210. However, the string matching in #85823 is _very_ crude and already breaks down when a variable name starts with `mut`. I have made this a bit more robust; further improvements could definitely be made but are complicated by the lack of information provided by an earlier pass: https://github.com/rust-lang/rust/blob/ce331ee6ee010438d1a58c7da8ced4f26d69a20e/compiler/rustc_mir_build/src/build/matches/mod.rs#L2103-L2107 I have also fixed a missing comma in the error message.
Showing
想要评论请 注册 或 登录