rust/tests/ui/obsolete-in-place/bad.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
253 B
Rust
Raw Normal View History

2018-05-24 16:34:09 -05:00
// Check that `<-` and `in` syntax gets a hard error.
2019-05-13 16:19:19 -05:00
fn foo() {
let (x, y) = (0, 0);
x <- y; //~ ERROR unexpected token: `<-`
2018-05-24 16:34:09 -05:00
}
fn main() {
2019-05-13 16:19:19 -05:00
let (foo, bar) = (0, 0);
in(foo) { bar }; //~ ERROR expected expression, found keyword `in`
2018-05-24 16:34:09 -05:00
}