rust/src/test/ui/parser/use-unclosed-brace.rs

26 lines
1.0 KiB
Rust
Raw Normal View History

2021-04-09 01:35:04 +00:00
use foo::{bar, baz;
//~^ ERROR expected one of `,`, `::`, `as`, or `}`, found `;`
use std::fmt::Display;
//~^ ERROR expected identifier, found keyword `use`
//~| ERROR expected one of `,`, `::`, `as`, or `}`, found `std`
//~| ERROR expected one of `,`, `::`, `as`, or `}`, found `;`
mod bar { }
//~^ ERROR expected identifier, found keyword `mod`
//~| ERROR expected one of `,`, `::`, `as`, or `}`, found `bar`
//~| ERROR expected one of `,`, `::`, `as`, or `}`, found `{`
mod baz { }
//~^ ERROR expected identifier, found keyword `mod`
//~| ERROR expected one of `,`, `::`, `as`, or `}`, found `{`
//~| ERROR expected one of `,`, `::`, `as`, or `}`, found `baz`
//~| ERROR expected one of `,` or `}`, found keyword `mod`
fn main() {}
//~^ ERROR expected identifier, found keyword `fn`
//~| ERROR expected one of `,`, `::`, `as`, or `}`, found `(`
//~| ERROR expected one of `,` or `}`, found keyword `fn`
//~| ERROR expected one of `,`, `::`, `as`, or `}`, found `main`
//~ ERROR this file contains an unclosed delimiter