diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2024-07-09 22:30:26 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2025-02-10 20:21:39 +0000 |
| commit | f0845adb0c1b7a7fa1bef73e749b2d7e1d7f374d (patch) | |
| tree | e97d87013709bda13934fdc452a2a459a069876a /tests/ui/parser/mut-patterns.stderr | |
| parent | 8c04e395952022a451138dc4dbead6dd6ae65203 (diff) | |
| download | rust-f0845adb0c1b7a7fa1bef73e749b2d7e1d7f374d.tar.gz rust-f0845adb0c1b7a7fa1bef73e749b2d7e1d7f374d.zip | |
Show diff suggestion format on verbose replacement
```
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> $DIR/attempted-access-non-fatal.rs:7:15
|
LL | let _ = 2.l;
| ^
|
help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix
|
LL - let _ = 2.l;
LL + let _ = 2.0f64;
|
```
Diffstat (limited to 'tests/ui/parser/mut-patterns.stderr')
| -rw-r--r-- | tests/ui/parser/mut-patterns.stderr | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/tests/ui/parser/mut-patterns.stderr b/tests/ui/parser/mut-patterns.stderr index ad19a60af34..43f6a344bf3 100644 --- a/tests/ui/parser/mut-patterns.stderr +++ b/tests/ui/parser/mut-patterns.stderr @@ -33,8 +33,9 @@ LL | let mut (x @ y) = 0; = note: `mut` may be followed by `variable` and `variable @ pattern` help: add `mut` to each binding | -LL | let (mut x @ mut y) = 0; - | ~~~~~~~~~~~~~~~ +LL - let mut (x @ y) = 0; +LL + let (mut x @ mut y) = 0; + | error: `mut` on a binding may not be repeated --> $DIR/mut-patterns.rs:14:13 @@ -69,8 +70,9 @@ LL | let mut Foo { x: x } = Foo { x: 3 }; = note: `mut` may be followed by `variable` and `variable @ pattern` help: add `mut` to each binding | -LL | let Foo { x: mut x } = Foo { x: 3 }; - | ~~~~~~~~~~~~~~~~ +LL - let mut Foo { x: x } = Foo { x: 3 }; +LL + let Foo { x: mut x } = Foo { x: 3 }; + | error: `mut` must be attached to each individual binding --> $DIR/mut-patterns.rs:27:9 @@ -81,8 +83,9 @@ LL | let mut Foo { x } = Foo { x: 3 }; = note: `mut` may be followed by `variable` and `variable @ pattern` help: add `mut` to each binding | -LL | let Foo { mut x } = Foo { x: 3 }; - | ~~~~~~~~~~~~~ +LL - let mut Foo { x } = Foo { x: 3 }; +LL + let Foo { mut x } = Foo { x: 3 }; + | error: `mut` on a binding may not be repeated --> $DIR/mut-patterns.rs:32:13 @@ -151,8 +154,9 @@ LL | let mut W(mut a, W(b, W(ref c, W(d, B { box f })))) = note: `mut` may be followed by `variable` and `variable @ pattern` help: add `mut` to each binding | -LL | let W(mut a, W(mut b, W(ref c, W(mut d, B { box mut f })))) - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +LL - let mut W(mut a, W(b, W(ref c, W(d, B { box f })))) +LL + let W(mut a, W(mut b, W(ref c, W(mut d, B { box mut f })))) + | error: expected identifier, found `x` --> $DIR/mut-patterns.rs:48:21 |
