diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-01-18 22:56:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-18 22:56:48 +0100 |
| commit | 2a830e47e11ad46f1df86c10b58aea17e7d273d0 (patch) | |
| tree | ef53985ae377e166b1bb6f55079ecb2376bb36bb /src/test/ui/error-codes | |
| parent | 42accf06dc1e9ed65f2a9651202d5d7eacc1ddc5 (diff) | |
| parent | ec3c5b0199045b3ae3959631998451543bd99518 (diff) | |
| download | rust-2a830e47e11ad46f1df86c10b58aea17e7d273d0.tar.gz rust-2a830e47e11ad46f1df86c10b58aea17e7d273d0.zip | |
Rollup merge of #57725 - estebank:parens, r=michaelwoerister
Use structured suggestion to surround struct literal with parenthesis
Diffstat (limited to 'src/test/ui/error-codes')
| -rw-r--r-- | src/test/ui/error-codes/E0423.stderr | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/test/ui/error-codes/E0423.stderr b/src/test/ui/error-codes/E0423.stderr index c422a1e7957..d0deb8ce7ea 100644 --- a/src/test/ui/error-codes/E0423.stderr +++ b/src/test/ui/error-codes/E0423.stderr @@ -29,19 +29,25 @@ error[E0423]: expected value, found struct `S` --> $DIR/E0423.rs:12:32 | LL | if let S { x: _x, y: 2 } = S { x: 1, y: 2 } { println!("Ok"); } - | ^ did you mean `(S { /* fields */ })`? + | ^--------------- + | | + | help: surround the struct literal with parenthesis: `(S { x: 1, y: 2 })` error[E0423]: expected value, found struct `T` --> $DIR/E0423.rs:15:8 | LL | if T {} == T {} { println!("Ok"); } - | ^ did you mean `(T { /* fields */ })`? + | ^--- + | | + | help: surround the struct literal with parenthesis: `(T {})` error[E0423]: expected value, found struct `std::ops::Range` --> $DIR/E0423.rs:21:14 | LL | for _ in std::ops::Range { start: 0, end: 10 } {} - | ^^^^^^^^^^^^^^^ did you mean `(std::ops::Range { /* fields */ })`? + | ^^^^^^^^^^^^^^^---------------------- + | | + | help: surround the struct literal with parenthesis: `(std::ops::Range { start: 0, end: 10 })` error: aborting due to 7 previous errors |
