2024-07-30 23:04:23 -04:00
|
|
|
//! Ensure that macros produce an error if fragment specifiers are missing.
|
2022-04-08 16:04:37 +03:00
|
|
|
|
|
|
|
|
macro_rules! used_arm {
|
2024-07-30 23:04:23 -04:00
|
|
|
( $( any_token $field_rust_type )* ) => {}; //~ ERROR missing fragment
|
2022-04-08 16:04:37 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
macro_rules! used_macro_unused_arm {
|
|
|
|
|
() => {};
|
2024-07-30 23:04:23 -04:00
|
|
|
( $name ) => {}; //~ ERROR missing fragment
|
2022-04-08 16:04:37 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
macro_rules! unused_macro {
|
2024-07-30 23:04:23 -04:00
|
|
|
( $name ) => {}; //~ ERROR missing fragment
|
2015-11-25 21:01:23 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
2022-04-08 16:04:37 +03:00
|
|
|
used_arm!();
|
|
|
|
|
used_macro_unused_arm!();
|
2015-11-25 21:01:23 +01:00
|
|
|
}
|