mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-26 13:01:27 +03:00
24 lines
516 B
Rust
24 lines
516 B
Rust
//! Ensure that macros produce an error if fragment specifiers are missing.
|
|
|
|
macro_rules! used_arm {
|
|
( $( any_token $field_rust_type )* ) => {}; //~ ERROR missing fragment
|
|
}
|
|
|
|
macro_rules! used_macro_unused_arm {
|
|
() => {};
|
|
( $name ) => {}; //~ ERROR missing fragment
|
|
}
|
|
|
|
macro_rules! unused_macro {
|
|
( $name ) => {}; //~ ERROR missing fragment
|
|
}
|
|
|
|
macro_rules! accidental_dollar_prefix {
|
|
( $test:$tt ) => {}; //~ ERROR missing fragment
|
|
}
|
|
|
|
fn main() {
|
|
used_arm!();
|
|
used_macro_unused_arm!();
|
|
}
|