diff options
| author | Ezra Shaw <Ezrasure@outlook.com> | 2023-04-21 13:29:15 +1200 |
|---|---|---|
| committer | Ezra Shaw <ezrashawdev@gmail.com> | 2023-05-05 22:40:05 +1200 |
| commit | d2608dfabb3a353fd2ab25f8bb1abf04b497af3b (patch) | |
| tree | b8bfe079d9b0d1ca5cd126c59c63f262acc54302 | |
| parent | 87a1b3840ecfebdcd22313ed37f0609732d8cf83 (diff) | |
| download | rust-d2608dfabb3a353fd2ab25f8bb1abf04b497af3b.tar.gz rust-d2608dfabb3a353fd2ab25f8bb1abf04b497af3b.zip | |
implement review comment
Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
| -rw-r--r-- | compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs b/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs index 0a89eb07245..a98a07a74e5 100644 --- a/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs +++ b/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs @@ -1268,9 +1268,9 @@ fn suggest_ampmut<'tcx>( // shrink the span to just after the `&` in `&variable` let span = span.with_lo(span.lo() + BytePos(1)).shrink_to_lo(); (true, span, "mut ".to_owned()) - // otherwise, suggest that the user annotates the binding; we provide the - // type of the local. } else { + // otherwise, suggest that the user annotates the binding; we provide the + // type of the local. let ty_mut = local_decl.ty.builtin_deref(true).unwrap(); assert_eq!(ty_mut.mutbl, hir::Mutability::Not); |
