diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-03-26 09:05:39 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-26 09:05:39 +0100 |
| commit | b316514dbd716d7885cb5d5f4be43e3b63441b49 (patch) | |
| tree | befdb4bb9eea756a2cfe7ffb8d6477ed689a0365 /src/test/ui/error-codes | |
| parent | 54479c624cc24bb852291d83e11cc19389dcb21b (diff) | |
| parent | d72ef21ddd4d56b3ec169a5ed64fa4cbf778c5c8 (diff) | |
| download | rust-b316514dbd716d7885cb5d5f4be43e3b63441b49.tar.gz rust-b316514dbd716d7885cb5d5f4be43e3b63441b49.zip | |
Rollup merge of #59150 - estebank:type-ascription, r=varkor
Expand suggestions for type ascription parse errors Fix #51222. CC #48016, #47666, #54516, #34255.
Diffstat (limited to 'src/test/ui/error-codes')
| -rw-r--r-- | src/test/ui/error-codes/E0423.stderr | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/error-codes/E0423.stderr b/src/test/ui/error-codes/E0423.stderr index bdcfaae60a0..b0ef4e1b254 100644 --- a/src/test/ui/error-codes/E0423.stderr +++ b/src/test/ui/error-codes/E0423.stderr @@ -3,6 +3,14 @@ error: expected type, found `1` | LL | if let S { x: _x, y: 2 } = S { x: 1, y: 2 } { println!("Ok"); } | ^ expecting a type here because of type ascription + | + = note: type ascription is a nightly-only feature that lets you annotate an expression with a type: `<expr>: <type>` +note: this expression expects an ascribed type after the colon + --> $DIR/E0423.rs:12:36 + | +LL | if let S { x: _x, y: 2 } = S { x: 1, y: 2 } { println!("Ok"); } + | ^ + = help: this might be indicative of a syntax error elsewhere error: expected expression, found `==` --> $DIR/E0423.rs:15:13 @@ -15,6 +23,14 @@ error: expected type, found `0` | LL | for _ in std::ops::Range { start: 0, end: 10 } {} | ^ expecting a type here because of type ascription + | + = note: type ascription is a nightly-only feature that lets you annotate an expression with a type: `<expr>: <type>` +note: this expression expects an ascribed type after the colon + --> $DIR/E0423.rs:21:32 + | +LL | for _ in std::ops::Range { start: 0, end: 10 } {} + | ^^^^^ + = help: this might be indicative of a syntax error elsewhere error[E0423]: expected function, found struct `Foo` --> $DIR/E0423.rs:4:13 |
