diff options
| author | Lukas Wirth <lukastw97@gmail.com> | 2023-03-29 18:07:25 +0200 |
|---|---|---|
| committer | Lukas Wirth <lukastw97@gmail.com> | 2023-03-29 18:07:25 +0200 |
| commit | f1f64e92d72d4db0e63024b62bcc9da9daadb83e (patch) | |
| tree | 3c6b810df11b53636f46a31651086d660bab65ce | |
| parent | 798990bf3312000f3297110cd818ca09b2722bfa (diff) | |
| download | rust-f1f64e92d72d4db0e63024b62bcc9da9daadb83e.tar.gz rust-f1f64e92d72d4db0e63024b62bcc9da9daadb83e.zip | |
Fix mutability_error::overloaded_index test
| -rw-r--r-- | crates/ide-diagnostics/src/handlers/mutability_errors.rs | 8 |
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) => (), } |
