diff options
Diffstat (limited to 'tests/ui/obsolete-in-place/bad.rs')
-rw-r--r-- | tests/ui/obsolete-in-place/bad.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/obsolete-in-place/bad.rs b/tests/ui/obsolete-in-place/bad.rs new file mode 100644 index 000000000..a491bb21a --- /dev/null +++ b/tests/ui/obsolete-in-place/bad.rs @@ -0,0 +1,11 @@ +// Check that `<-` and `in` syntax gets a hard error. + +fn foo() { + let (x, y) = (0, 0); + x <- y; //~ ERROR unexpected token: `<-` +} + +fn main() { + let (foo, bar) = (0, 0); + in(foo) { bar }; //~ ERROR expected expression, found keyword `in` +} |