summaryrefslogtreecommitdiff
path: root/src/tools/clippy/tests/ui/items_after_test_module/block_module.rs
blob: 5136b2557ec1a6d695b66a4b67181d7ea71f29c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//@compile-flags: --test
#![allow(unused)]
#![warn(clippy::items_after_test_module)]

fn main() {}

fn should_not_lint() {}

#[allow(dead_code)]
#[allow(unused)] // Some attributes to check that span replacement is good enough
#[allow(clippy::allow_attributes)]
#[cfg(test)]
mod tests {
    #[test]
    fn hi() {}
}

fn should_lint() {}

const SHOULD_ALSO_LINT: usize = 1;
macro_rules! should_not_lint {
    () => {};
}