rust/src/test/ui/parser/issue-44406.rs
Esteban Kuber b82ec362ca Recover from Foo(a: 1, b: 2)
Detect likely `struct` literal using parentheses as delimiters and emit
targeted suggestion instead of type ascription parse error.

Fix #61326.
2021-09-07 17:45:16 +00:00

10 lines
214 B
Rust

macro_rules! foo {
($rest: tt) => {
bar(baz: $rest) //~ ERROR invalid `struct` delimiters or `fn` call arguments
}
}
fn main() {
foo!(true);
//~^ ERROR expected identifier, found keyword
}