]> git.lizzy.rs Git - rust.git/blob - tests/ui-toml/upper_case_acronyms_aggressive/upper_case_acronyms.rs
Auto merge of #7357 - ebobrow:unbalanced-tick, r=xFrednet,flip1995
[rust.git] / tests / ui-toml / upper_case_acronyms_aggressive / upper_case_acronyms.rs
1 #![warn(clippy::upper_case_acronyms)]
2
3 struct HTTPResponse; // not linted by default, but with cfg option
4
5 struct CString; // not linted
6
7 enum Flags {
8     NS, // not linted
9     CWR,
10     ECE,
11     URG,
12     ACK,
13     PSH,
14     RST,
15     SYN,
16     FIN,
17 }
18
19 // linted with cfg option, beware that lint suggests `GccllvmSomething` instead of
20 // `GccLlvmSomething`
21 struct GCCLLVMSomething;
22
23 // don't warn on public items
24 pub struct MIXEDCapital;
25
26 pub struct FULLCAPITAL;
27
28 // enum variants should not be linted if the num is pub
29 pub enum ParseError<T> {
30     FULLCAPITAL(u8),
31     MIXEDCapital(String),
32     Utf8(std::string::FromUtf8Error),
33     Parse(T, String),
34 }
35
36 // private, do lint here
37 enum ParseErrorPrivate<T> {
38     WASD(u8),
39     WASDMixed(String),
40     Utf8(std::string::FromUtf8Error),
41     Parse(T, String),
42 }
43
44 fn main() {}