]> git.lizzy.rs Git - rust.git/blobdiff - 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
index bc5a923a3f32fc43ab866e61d6a1ba1028c27d1f..4929922c83fe6c0338d333e31f76149e547e3ad0 100644 (file)
@@ -11,6 +11,14 @@ error: expected type, found `0`
    |
 LL |     println!("test"): 0;
    |                       ^ expecting a type here because of type ascription
+   |
+   = note: #![feature(type_ascription)] lets you annotate an expression with a type: `<expr>: <type>`
+note: this expression expects an ascribed type after the colon
+  --> $DIR/type-ascription-instead-of-statement-end.rs:9:5
+   |
+LL |     println!("test"): 0;
+   |     ^^^^^^^^^^^^^^^^
+   = help: this might be indicative of a syntax error elsewhere
 
 error: aborting due to 2 previous errors