From f1f64e92d72d4db0e63024b62bcc9da9daadb83e Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Wed, 29 Mar 2023 18:07:25 +0200 Subject: [PATCH] Fix mutability_error::overloaded_index test --- crates/ide-diagnostics/src/handlers/mutability_errors.rs | 8 ++++---- 1 file 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) => (), }