about summary refs log tree commit diff
path: root/tests/ui/macros/macro-missing-fragment.rs
blob: 533aa147bcbf53353b0a7e6308e4e9a0d0183cda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//! Ensure that macros produce an error if fragment specifiers are missing.

macro_rules! used_arm {
    ( $( any_token $field_rust_type )* ) => {}; //~ ERROR missing fragment
                                                //~| ERROR missing fragment
}

macro_rules! used_macro_unused_arm {
    () => {};
    ( $name ) => {}; //~ ERROR missing fragment
}

macro_rules! unused_macro {
    ( $name ) => {}; //~ ERROR missing fragment
}

fn main() {
    used_arm!();
    used_macro_unused_arm!();
}