diff options
| author | Deadbeef <ent3rm4n@gmail.com> | 2025-08-06 22:37:14 +0800 |
|---|---|---|
| committer | Deadbeef <ent3rm4n@gmail.com> | 2025-08-16 22:34:17 +0800 |
| commit | 4335405fa7c709b2733c6121fbf4bc0d8e291dcc (patch) | |
| tree | 31e00b11b2f98fcda89659385b8dd90eac49e241 /tests/ui/array-slice-vec | |
| parent | 2e2642e641a941f0a1400c7827fd89aa86fef8f4 (diff) | |
| download | rust-4335405fa7c709b2733c6121fbf4bc0d8e291dcc.tar.gz rust-4335405fa7c709b2733c6121fbf4bc0d8e291dcc.zip | |
overhaul `&mut` suggestions in borrowck errors
Diffstat (limited to 'tests/ui/array-slice-vec')
| -rw-r--r-- | tests/ui/array-slice-vec/slice-mut-2.stderr | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/ui/array-slice-vec/slice-mut-2.stderr b/tests/ui/array-slice-vec/slice-mut-2.stderr index 8cc2c6e0397..228417c873d 100644 --- a/tests/ui/array-slice-vec/slice-mut-2.stderr +++ b/tests/ui/array-slice-vec/slice-mut-2.stderr @@ -4,10 +4,10 @@ error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference LL | let _ = &mut x[2..4]; | ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable | -help: consider changing this to be a mutable reference +help: consider changing this binding's type | -LL | let x: &[isize] = &mut [1, 2, 3, 4, 5]; - | +++ +LL | let x: &mut [isize] = &[1, 2, 3, 4, 5]; + | +++ error: aborting due to 1 previous error |
