]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type/type-ascription-instead-of-statement-end.stderr
Rollup merge of #61389 - Zoxc:arena-cleanup, r=eddyb
[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: #![feature(type_ascription)] lets you annotate an expression with a type: `<expr>: <type>`
16 note: this expression expects an ascribed type after the colon
17   --> $DIR/type-ascription-instead-of-statement-end.rs:9:5
18    |
19 LL |     println!("test"): 0;
20    |     ^^^^^^^^^^^^^^^^
21    = help: this might be indicative of a syntax error elsewhere
22
23 error: aborting due to 2 previous errors
24