1
Fork 0
rust/src/test/ui/macros/macro-missing-fragment.rs
Vadim Petrochenkov 379ae12a1d expand: Remove ParseSess::missing_fragment_specifiers
It was used for deduplicating some errors for legacy code which are mostly deduplicated even without that, but at cost of global mutable state, which is not a good tradeoff.
2022-04-09 15:44:19 +03:00

26 lines
555 B
Rust

#![warn(missing_fragment_specifier)]
macro_rules! used_arm {
( $( any_token $field_rust_type )* ) => {};
//~^ ERROR missing fragment
//~| WARN missing fragment
//~| WARN this was previously accepted
}
macro_rules! used_macro_unused_arm {
() => {};
( $name ) => {};
//~^ WARN missing fragment
//~| WARN this was previously accepted
}
macro_rules! unused_macro {
( $name ) => {};
//~^ WARN missing fragment
//~| WARN this was previously accepted
}
fn main() {
used_arm!();
used_macro_unused_arm!();
}