2020-06-09 19:36:33 +00:00
|
|
|
// check-pass
|
|
|
|
|
|
|
|
#[warn(meta_variable_misuse)]
|
|
|
|
macro_rules! foo {
|
|
|
|
( $($i:ident)* ) => { $($i)+ }; //~ WARN meta-variable repeats with different Kleene operator
|
|
|
|
}
|
|
|
|
|
2020-12-19 21:30:56 +00:00
|
|
|
#[warn(missing_fragment_specifier)]
|
|
|
|
macro_rules! m { ($i) => {} } //~ WARN missing fragment specifier
|
|
|
|
//~| WARN this was previously accepted
|
|
|
|
|
2020-06-09 19:36:33 +00:00
|
|
|
#[warn(soft_unstable)]
|
|
|
|
mod benches {
|
|
|
|
#[bench] //~ WARN use of unstable library feature 'test'
|
|
|
|
//~| WARN this was previously accepted
|
|
|
|
fn foo() {}
|
|
|
|
}
|
|
|
|
|
2020-11-12 19:29:52 +00:00
|
|
|
#[deprecated = "reason"]
|
|
|
|
macro_rules! deprecated {
|
|
|
|
() => {}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[allow(deprecated)]
|
|
|
|
mod deprecated {
|
|
|
|
deprecated!(); // No warning
|
|
|
|
}
|
|
|
|
|
2020-06-09 19:36:33 +00:00
|
|
|
#[warn(incomplete_include)]
|
|
|
|
fn main() {
|
|
|
|
// WARN see in the stderr file, the warning points to the included file.
|
|
|
|
include!("expansion-time-include.rs");
|
|
|
|
}
|