]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/enum_variants.rs
iterate List by value
[rust.git] / tests / ui / enum_variants.rs
index 4ddb7207a30b5761b30fd89b0ededd89f58c565e..01774a2a9845cf26c0a6c70c131e8fed7e71bb1d 100644 (file)
@@ -1,15 +1,15 @@
-#![feature(tool_lints)]
-
 #![feature(non_ascii_idents)]
-
-#![warn(clippy::all, clippy::pub_enum_variant_names)]
+#![warn(clippy::enum_variant_names, clippy::pub_enum_variant_names)]
+#![allow(non_camel_case_types)]
 
 enum FakeCallType {
-    CALL, CREATE
+    CALL,
+    CREATE,
 }
 
 enum FakeCallType2 {
-    CALL, CREATELL
+    CALL,
+    CREATELL,
 }
 
 enum Foo {
@@ -39,7 +39,8 @@ enum BadCallType {
     CallTypeDestroy,
 }
 
-enum TwoCallType { // no error
+enum TwoCallType {
+    // no error
     CallTypeCall,
     CallTypeCreate,
 }
@@ -50,7 +51,8 @@ enum Consts {
     ConstantLie,
 }
 
-enum Two { // no error here
+enum Two {
+    // no error here
     ConstantInt,
     ConstantInfer,
 }
@@ -118,4 +120,17 @@ enum N {
     Float,
 }
 
+// should not lint
+enum Peek {
+    Peek1,
+    Peek2,
+    Peek3,
+}
+
+// should not lint
+pub enum NetworkLayer {
+    Layer2,
+    Layer3,
+}
+
 fn main() {}