about summary refs log tree commit diff
diff options
context:
space:
mode:
authordswij <dswijj@gmail.com>2021-12-22 17:04:48 +0800
committerDharma Saputra Wijaya <dswijj@gmail.com>2021-12-25 21:55:20 +0800
commitdf2e4d17c69c92ce46fc90085a4f99aaa298233e (patch)
treec7a726ac89fd63b6986d2b1e341469149734473e
parentc76e2d1e59d466c725a02de7fe43df61fd7eb56f (diff)
downloadrust-df2e4d17c69c92ce46fc90085a4f99aaa298233e.tar.gz
rust-df2e4d17c69c92ce46fc90085a4f99aaa298233e.zip
update `enum_variants` test
-rw-r--r--tests/ui/enum_variants.rs6
-rw-r--r--tests/ui/enum_variants.stderr42
2 files changed, 33 insertions, 15 deletions
diff --git a/tests/ui/enum_variants.rs b/tests/ui/enum_variants.rs
index 083f5143e6e..d3662a0a213 100644
--- a/tests/ui/enum_variants.rs
+++ b/tests/ui/enum_variants.rs
@@ -145,4 +145,10 @@ enum HIDataRequest {
     DeleteUnpubHIData(String),
 }
 
+enum North {
+    Normal,
+    NoLeft,
+    NoRight,
+}
+
 fn main() {}
diff --git a/tests/ui/enum_variants.stderr b/tests/ui/enum_variants.stderr
index add8a91e26b..82a2b3dccb0 100644
--- a/tests/ui/enum_variants.stderr
+++ b/tests/ui/enum_variants.stderr
@@ -6,6 +6,18 @@ LL |     cFoo,
    |
    = note: `-D clippy::enum-variant-names` implied by `-D warnings`
 
+error: all variants have the same prefix: `c`
+  --> $DIR/enum_variants.rs:14:1
+   |
+LL | / enum Foo {
+LL | |     cFoo,
+LL | |     cBar,
+LL | |     cBaz,
+LL | | }
+   | |_^
+   |
+   = help: remove the prefixes and use full paths to the variants instead of glob imports
+
 error: variant name starts with the enum's name
   --> $DIR/enum_variants.rs:26:5
    |
@@ -60,31 +72,31 @@ LL | | }
    |
    = help: remove the prefixes and use full paths to the variants instead of glob imports
 
-error: all variants have the same prefix: `WithOut`
-  --> $DIR/enum_variants.rs:81:1
+error: all variants have the same prefix: `C`
+  --> $DIR/enum_variants.rs:59:1
    |
-LL | / enum Seallll {
-LL | |     WithOutCake,
-LL | |     WithOutTea,
-LL | |     WithOut,
+LL | / enum Something {
+LL | |     CCall,
+LL | |     CCreate,
+LL | |     CCryogenize,
 LL | | }
    | |_^
    |
    = help: remove the prefixes and use full paths to the variants instead of glob imports
 
-error: all variants have the same prefix: `Prefix`
-  --> $DIR/enum_variants.rs:87:1
+error: all variants have the same prefix: `WithOut`
+  --> $DIR/enum_variants.rs:81:1
    |
-LL | / enum NonCaps {
-LL | |     Prefixçš„,
-LL | |     PrefixTea,
-LL | |     PrefixCake,
+LL | / enum Seallll {
+LL | |     WithOutCake,
+LL | |     WithOutTea,
+LL | |     WithOut,
 LL | | }
    | |_^
    |
    = help: remove the prefixes and use full paths to the variants instead of glob imports
 
-error: all variants have the same postfix: `IData`
+error: all variants have the same postfix: `DataI`
   --> $DIR/enum_variants.rs:136:1
    |
 LL | / enum IDataRequest {
@@ -96,7 +108,7 @@ LL | | }
    |
    = help: remove the postfixes and use full paths to the variants instead of glob imports
 
-error: all variants have the same postfix: `HIData`
+error: all variants have the same postfix: `DataIH`
   --> $DIR/enum_variants.rs:142:1
    |
 LL | / enum HIDataRequest {
@@ -108,5 +120,5 @@ LL | | }
    |
    = help: remove the postfixes and use full paths to the variants instead of glob imports
 
-error: aborting due to 11 previous errors
+error: aborting due to 12 previous errors