]> git.lizzy.rs Git - rust.git/blob - tests/ui/macros/macro-missing-fragment.rs
Rollup merge of #106958 - jyn514:labels, r=m-ou-se
[rust.git] / tests / ui / macros / macro-missing-fragment.rs
1 #![warn(missing_fragment_specifier)]
2
3 macro_rules! used_arm {
4     ( $( any_token $field_rust_type )* ) => {};
5     //~^ ERROR missing fragment
6     //~| WARN missing fragment
7     //~| WARN this was previously accepted
8 }
9
10 macro_rules! used_macro_unused_arm {
11     () => {};
12     ( $name ) => {};
13     //~^ WARN missing fragment
14     //~| WARN this was previously accepted
15 }
16
17 macro_rules! unused_macro {
18     ( $name ) => {};
19     //~^ WARN missing fragment
20     //~| WARN this was previously accepted
21 }
22
23 fn main() {
24     used_arm!();
25     used_macro_unused_arm!();
26 }