rust/tests/ui/macros/invalid-fragment-specifier.rs
Tshepang Mbambo e3859d206c add test to guard against inaccurate diagnostic
Also replaces an incomplete test
2024-02-17 14:15:22 +02:00

11 lines
263 B
Rust

macro_rules! test {
($wrong:id) => {};
} //~^ ERROR: invalid fragment specifier `id`
// guard against breaking raw identifier diagnostic
macro_rules! test_raw_identifer {
($wrong:r#if) => {};
} //~^ ERROR: invalid fragment specifier `r#if`
fn main() {}