mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 10:18:25 +00:00

This was attempted in [1] then reverted in [2] because of fallout. Recently, this was made an edition-dependent error in [3]. Make missing fragment specifiers an unconditional error again. [1]: https://github.com/rust-lang/rust/pull/75516 [2]: https://github.com/rust-lang/rust/pull/80210 [3]: https://github.com/rust-lang/rust/pull/128006
25 lines
531 B
Rust
25 lines
531 B
Rust
//@ check-pass
|
|
|
|
#[warn(meta_variable_misuse)]
|
|
macro_rules! foo {
|
|
( $($i:ident)* ) => { $($i)+ }; //~ WARN meta-variable repeats with different Kleene operator
|
|
}
|
|
|
|
#[deprecated = "reason"]
|
|
macro_rules! deprecated {
|
|
() => {}
|
|
}
|
|
|
|
#[allow(deprecated)]
|
|
mod deprecated {
|
|
deprecated!(); // No warning
|
|
}
|
|
|
|
#[warn(incomplete_include)]
|
|
fn main() {
|
|
// WARN see in the stderr file, the warning points to the included file.
|
|
include!("expansion-time-include.rs");
|
|
}
|
|
|
|
//~? WARN include macro expected single expression in source
|