Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit f1f64e9

Browse files
committed
Fix mutability_error::overloaded_index test
1 parent 798990b commit f1f64e9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crates/ide-diagnostics/src/handlers/mutability_errors.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -589,17 +589,17 @@ fn f() {
589589
let y = &x[2];
590590
let x = Foo;
591591
let y = &mut x[2];
592-
//^^^^ 💡 error: cannot mutate immutable variable `x`
592+
//^💡 error: cannot mutate immutable variable `x`
593593
let mut x = &mut Foo;
594594
//^^^^^ 💡 weak: variable does not need to be mutable
595595
let y: &mut (i32, u8) = &mut x[2];
596596
let x = Foo;
597597
let ref mut y = x[7];
598-
//^^^^ 💡 error: cannot mutate immutable variable `x`
598+
//^ 💡 error: cannot mutate immutable variable `x`
599599
let (ref mut y, _) = x[3];
600-
//^^^^ 💡 error: cannot mutate immutable variable `x`
600+
//^ 💡 error: cannot mutate immutable variable `x`
601601
match x[10] {
602-
//^^^^^ 💡 error: cannot mutate immutable variable `x`
602+
//^ 💡 error: cannot mutate immutable variable `x`
603603
(ref y, _) => (),
604604
(_, ref mut y) => (),
605605
}

0 commit comments

Comments
 (0)