diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2019-03-12 19:27:10 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2019-03-22 19:50:18 -0700 |
| commit | 8ba1a97e375451f51d0657e2135d4e6e657fd72e (patch) | |
| tree | 30437bf238625c71e970e9a8944220148fc58b3c /src/test/ui/error-codes | |
| parent | 9f91bee03f3eea93285330354dda54706028671c (diff) | |
| download | rust-8ba1a97e375451f51d0657e2135d4e6e657fd72e.tar.gz rust-8ba1a97e375451f51d0657e2135d4e6e657fd72e.zip | |
Expand suggestions for type ascription parse errors
Diffstat (limited to 'src/test/ui/error-codes')
| -rw-r--r-- | src/test/ui/error-codes/E0423.stderr | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/test/ui/error-codes/E0423.stderr b/src/test/ui/error-codes/E0423.stderr index bdcfaae60a0..af5f88f4ce5 100644 --- a/src/test/ui/error-codes/E0423.stderr +++ b/src/test/ui/error-codes/E0423.stderr @@ -3,6 +3,19 @@ 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 expressions with a type: `<expr>: <type>` +note: this expression is annotated with type ascription... + --> $DIR/E0423.rs:12:36 + | +LL | if let S { x: _x, y: 2 } = S { x: 1, y: 2 } { println!("Ok"); } + | ^ +note: ...due to this, which is why a type is expected after + --> $DIR/E0423.rs:12:37 + | +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 +28,19 @@ 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 expressions with a type: `<expr>: <type>` +note: this expression is annotated with type ascription... + --> $DIR/E0423.rs:21:32 + | +LL | for _ in std::ops::Range { start: 0, end: 10 } {} + | ^^^^^ +note: ...due to this, which is why a type is expected after + --> $DIR/E0423.rs:21:37 + | +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 |
