rust/tests/ui/items_after_test_module/imported_module.rs

21 lines
395 B
Rust
Raw Normal View History

2023-04-12 13:17:26 -05:00
//@compile-flags: --test
2023-03-31 02:06:39 -05:00
#![allow(unused)]
#![warn(clippy::items_after_test_module)]
// Nothing here should lint, as `tests` is an imported module (that has no body).
2023-03-31 02:06:39 -05:00
fn main() {}
fn should_not_lint() {}
2023-04-28 13:23:05 -05:00
#[path = "auxiliary/tests.rs"]
2023-03-31 02:06:39 -05:00
#[cfg(test)]
mod tests; // Should not lint
2023-03-31 02:06:39 -05:00
fn should_not_lint2() {}
2023-03-31 02:06:39 -05:00
const SHOULD_ALSO_NOT_LINT: usize = 1;
2023-03-31 02:06:39 -05:00
macro_rules! should_not_lint {
() => {};
}