rust/tests/ui/parser/issues/issue-15980.rs

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

18 lines
545 B
Rust
Raw Normal View History

use std::io;
fn main(){
let x: io::Result<()> = Ok(());
match x {
Err(ref e) if e.kind == io::EndOfFile {
//~^ NOTE while parsing this struct
return
//~^ ERROR expected identifier, found keyword `return`
//~| NOTE expected identifier, found keyword
}
//~^ NOTE expected one of `.`, `=>`, `?`, or an operator
_ => {}
2019-10-22 13:46:19 -05:00
//~^ ERROR expected one of `.`, `=>`, `?`, or an operator, found reserved identifier `_`
//~| NOTE unexpected token
}
}