diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2022-12-28 21:52:57 -0800 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2022-12-28 22:06:25 -0800 |
| commit | b9439ebf1240e75e8f110298bbfe868169f16ebe (patch) | |
| tree | 5cbfb892d5ad9a10ed9598bd75e779f4c45b4e1e /src/test/ui/pattern/move-ref-patterns | |
| parent | 92c1937a90e5b6f20fa6e87016d6869da363972e (diff) | |
Use verbose suggestions for mutability errors
Diffstat (limited to 'src/test/ui/pattern/move-ref-patterns')
| -rw-r--r-- | src/test/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern.stderr | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/test/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern.stderr b/src/test/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern.stderr index bb7b818368b..1b93267b397 100644 --- a/src/test/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern.stderr +++ b/src/test/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern.stderr @@ -104,20 +104,24 @@ LL | *_x0 = U; error[E0594]: cannot assign to `*_x0`, which is behind a `&` reference --> $DIR/borrowck-move-ref-pattern.rs:26:5 | -LL | let (ref _x0, _x1, ref _x2, ..) = tup; - | ------- help: consider changing this to be a mutable reference: `ref mut _x0` -... LL | *_x0 = U; | ^^^^^^^^ `_x0` is a `&` reference, so the data it refers to cannot be written + | +help: consider changing this to be a mutable reference + | +LL | let (ref mut _x0, _x1, ref _x2, ..) = tup; + | ~~~~~~~~~~~ error[E0594]: cannot assign to `*_x2`, which is behind a `&` reference --> $DIR/borrowck-move-ref-pattern.rs:27:5 | -LL | let (ref _x0, _x1, ref _x2, ..) = tup; - | ------- help: consider changing this to be a mutable reference: `ref mut _x2` -... LL | *_x2 = U; | ^^^^^^^^ `_x2` is a `&` reference, so the data it refers to cannot be written + | +help: consider changing this to be a mutable reference + | +LL | let (ref _x0, _x1, ref mut _x2, ..) = tup; + | ~~~~~~~~~~~ error[E0382]: use of moved value: `tup.1` --> $DIR/borrowck-move-ref-pattern.rs:28:10 |
