This was attempted in [1] then reverted in [2] because of fallout. Recently, this was made an edition-dependent error in [3]. Make missing fragment specifiers an unconditional error again. [1]: https://github.com/rust-lang/rust/pull/75516 [2]: https://github.com/rust-lang/rust/pull/80210 [3]: https://github.com/rust-lang/rust/pull/128006
11 lines
275 B
Rust
11 lines
275 B
Rust
macro_rules! foo {
|
|
{ $+ } => { //~ ERROR expected identifier, found `+`
|
|
//~^ ERROR missing fragment specifier
|
|
//~| ERROR missing fragment specifier
|
|
$(x)(y) //~ ERROR expected one of: `*`, `+`, or `?`
|
|
}
|
|
}
|
|
|
|
foo!();
|
|
|
|
fn main() {}
|