mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-30 16:39:26 +00:00
18 lines
252 B
Rust
18 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() {}
|
|
}
|