about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLukas Wirth <lukastw97@gmail.com>2023-03-29 18:07:25 +0200
committerLukas Wirth <lukastw97@gmail.com>2023-03-29 18:07:25 +0200
commitf1f64e92d72d4db0e63024b62bcc9da9daadb83e (patch)
tree3c6b810df11b53636f46a31651086d660bab65ce
parent798990bf3312000f3297110cd818ca09b2722bfa (diff)
downloadrust-f1f64e92d72d4db0e63024b62bcc9da9daadb83e.tar.gz
rust-f1f64e92d72d4db0e63024b62bcc9da9daadb83e.zip
Fix mutability_error::overloaded_index test
-rw-r--r--crates/ide-diagnostics/src/handlers/mutability_errors.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ide-diagnostics/src/handlers/mutability_errors.rs b/crates/ide-diagnostics/src/handlers/mutability_errors.rs
index 0b66350894a..ecd1db7ea87 100644
--- a/crates/ide-diagnostics/src/handlers/mutability_errors.rs
+++ b/crates/ide-diagnostics/src/handlers/mutability_errors.rs
@@ -589,17 +589,17 @@ fn f() {
     let y = &x[2];
     let x = Foo;
     let y = &mut x[2];
-               //^^^^ 💡 error: cannot mutate immutable variable `x`
+               //^💡 error: cannot mutate immutable variable `x`
     let mut x = &mut Foo;
       //^^^^^ 💡 weak: variable does not need to be mutable
     let y: &mut (i32, u8) = &mut x[2];
     let x = Foo;
     let ref mut y = x[7];
-                  //^^^^ 💡 error: cannot mutate immutable variable `x`
+                  //^ 💡 error: cannot mutate immutable variable `x`
     let (ref mut y, _) = x[3];
-                       //^^^^ 💡 error: cannot mutate immutable variable `x`
+                       //^ 💡 error: cannot mutate immutable variable `x`
     match x[10] {
-        //^^^^^ 💡 error: cannot mutate immutable variable `x`
+        //^ 💡 error: cannot mutate immutable variable `x`
         (ref y, _) => (),
         (_, ref mut y) => (),
     }