]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/upper_case_acronyms.rs
New upstream version 1.53.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / upper_case_acronyms.rs
CommitLineData
f20569fa
XL
1#![warn(clippy::upper_case_acronyms)]
2
3struct HTTPResponse; // not linted by default, but with cfg option
4
5struct CString; // not linted
6
7enum 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`
21struct GCCLLVMSomething;
22
cdc7bbd5
XL
23// public items must not be linted
24pub struct NOWARNINGHERE;
25pub struct ALSONoWarningHERE;
26
27// enum variants should not be linted if the num is pub
28pub enum ParseError<T> {
29 YDB(u8),
30 Utf8(std::string::FromUtf8Error),
31 Parse(T, String),
32}
33
34// private, do lint here
35enum ParseErrorPrivate<T> {
36 WASD(u8),
37 Utf8(std::string::FromUtf8Error),
38 Parse(T, String),
39}
40
f20569fa 41fn main() {}