]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lint/expansion-time.rs
Auto merge of #106349 - LeSeulArtichaut:dyn-star-tracking-issue, r=jackh726
[rust.git] / src / test / ui / lint / expansion-time.rs
1 // check-pass
2
3 #[warn(meta_variable_misuse)]
4 macro_rules! foo {
5     ( $($i:ident)* ) => { $($i)+ }; //~ WARN meta-variable repeats with different Kleene operator
6 }
7
8 #[warn(missing_fragment_specifier)]
9 macro_rules! m { ($i) => {} } //~ WARN missing fragment specifier
10                               //~| WARN this was previously accepted
11
12 #[warn(soft_unstable)]
13 mod benches {
14     #[bench] //~ WARN use of unstable library feature 'test'
15              //~| WARN this was previously accepted
16     fn foo() {}
17 }
18
19 #[deprecated = "reason"]
20 macro_rules! deprecated {
21     () => {}
22 }
23
24 #[allow(deprecated)]
25 mod deprecated {
26     deprecated!(); // No warning
27 }
28
29 #[warn(incomplete_include)]
30 fn main() {
31     // WARN see in the stderr file, the warning points to the included file.
32     include!("expansion-time-include.rs");
33 }