diff options
Diffstat (limited to 'src/test/ui/type/type-ascription-instead-of-statement-end.rs')
-rw-r--r-- | src/test/ui/type/type-ascription-instead-of-statement-end.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/type/type-ascription-instead-of-statement-end.rs b/src/test/ui/type/type-ascription-instead-of-statement-end.rs new file mode 100644 index 000000000..1d5565ab5 --- /dev/null +++ b/src/test/ui/type/type-ascription-instead-of-statement-end.rs @@ -0,0 +1,10 @@ +#![feature(type_ascription)] + +fn main() { + println!("test"): + 0; //~ ERROR expected type, found `0` +} + +fn foo() { + println!("test"): 0; //~ ERROR expected type, found `0` +} |