summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/lint-group-nonstandard-style.rs
blob: bd7f327bc0f63de1e840f8e35995f77ccc1dd6bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#![deny(nonstandard_style)]
#![allow(dead_code)]

fn CamelCase() {} //~ ERROR should have a snake

#[allow(nonstandard_style)]
mod test {
    fn CamelCase() {}

    #[forbid(nonstandard_style)]
    mod bad {
        fn CamelCase() {} //~ ERROR should have a snake

        static bad: isize = 1; //~ ERROR should have an upper
    }

    mod warn {
        #![warn(nonstandard_style)]

        fn CamelCase() {} //~ WARN should have a snake

        struct snake_case; //~ WARN should have an upper camel
    }
}

fn main() {}