]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type/type-ascription-instead-of-statement-end.stderr
Review comment
[rust.git] / src / test / ui / type / type-ascription-instead-of-statement-end.stderr
1 error: expected type, found `0`
2   --> $DIR/type-ascription-instead-of-statement-end.rs:5:5
3    |
4 LL |     println!("test"):
5    |                     - help: try using a semicolon: `;`
6 LL |     0;
7    |     ^ expecting a type here because of type ascription
8
9 error: expected type, found `0`
10   --> $DIR/type-ascription-instead-of-statement-end.rs:9:23
11    |
12 LL |     println!("test"): 0;
13    |                       ^ expecting a type here because of type ascription
14    |
15    = note: type ascription is a nightly-only feature that lets you annotate an expression with a type: `<expr>: <type>`
16 note: this expression is annotated with type ascription...
17   --> $DIR/type-ascription-instead-of-statement-end.rs:9:5
18    |
19 LL |     println!("test"): 0;
20    |     ^^^^^^^^^^^^^^^^
21 note: ...due to this, which is why a type is expected after
22   --> $DIR/type-ascription-instead-of-statement-end.rs:9:21
23    |
24 LL |     println!("test"): 0;
25    |                     ^
26    = help: this might be indicative of a syntax error elsewhere
27
28 error: aborting due to 2 previous errors
29