rust/tests/ui/tests_outside_test_module.rs
2023-04-02 00:35:46 +02:00

19 lines
252 B
Rust

// compile-flags: --test
#![allow(unused)]
#![warn(clippy::tests_outside_test_module)]
fn main() {
// test code goes here
}
// Should lint
#[test]
fn my_test() {}
#[cfg(test)]
mod tests {
// Should not lint
#[test]
fn my_test() {}
}