Skip to content

Commit

Permalink
Auto merge of #3581 - euclio:camel-case, r=flip1995
Browse files Browse the repository at this point in the history
fix breakage from rust-lang/rust#57088
  • Loading branch information
bors committed Dec 26, 2018
2 parents fc24fce + cd602c8 commit af14342
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 49 deletions.
1 change: 1 addition & 0 deletions tests/ui/builtin-type-shadow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// except according to those terms.

#![warn(clippy::builtin_type_shadow)]
#![allow(non_camel_case_types)]

fn foo<u32>(a: u32) -> u32 {
42
Expand Down
10 changes: 5 additions & 5 deletions tests/ui/builtin-type-shadow.stderr
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
error: This generic shadows the built-in type `u32`
--> $DIR/builtin-type-shadow.rs:12:8
--> $DIR/builtin-type-shadow.rs:13:8
|
12 | fn foo<u32>(a: u32) -> u32 {
13 | fn foo<u32>(a: u32) -> u32 {
| ^^^
|
= note: `-D clippy::builtin-type-shadow` implied by `-D warnings`

error[E0308]: mismatched types
--> $DIR/builtin-type-shadow.rs:13:5
--> $DIR/builtin-type-shadow.rs:14:5
|
12 | fn foo<u32>(a: u32) -> u32 {
13 | fn foo<u32>(a: u32) -> u32 {
| --- expected `u32` because of return type
13 | 42
14 | 42
| ^^ expected type parameter, found integral variable
|
= note: expected type `u32`
Expand Down
1 change: 1 addition & 0 deletions tests/ui/enum_variants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#![feature(non_ascii_idents)]
#![warn(clippy::all, clippy::pub_enum_variant_names)]
#![allow(non_camel_case_types)]

enum FakeCallType {
CALL,
Expand Down
88 changes: 44 additions & 44 deletions tests/ui/enum_variants.stderr
Original file line number Diff line number Diff line change
@@ -1,97 +1,97 @@
error: Variant name ends with the enum's name
--> $DIR/enum_variants.rs:24:5
--> $DIR/enum_variants.rs:25:5
|
24 | cFoo,
25 | cFoo,
| ^^^^
|
= note: `-D clippy::enum-variant-names` implied by `-D warnings`

error: Variant name starts with the enum's name
--> $DIR/enum_variants.rs:35:5
--> $DIR/enum_variants.rs:36:5
|
35 | FoodGood,
36 | FoodGood,
| ^^^^^^^^

error: Variant name starts with the enum's name
--> $DIR/enum_variants.rs:36:5
--> $DIR/enum_variants.rs:37:5
|
36 | FoodMiddle,
37 | FoodMiddle,
| ^^^^^^^^^^

error: Variant name starts with the enum's name
--> $DIR/enum_variants.rs:37:5
--> $DIR/enum_variants.rs:38:5
|
37 | FoodBad,
38 | FoodBad,
| ^^^^^^^

error: All variants have the same prefix: `Food`
--> $DIR/enum_variants.rs:34:1
--> $DIR/enum_variants.rs:35:1
|
34 | / enum Food {
35 | | FoodGood,
36 | | FoodMiddle,
37 | | FoodBad,
38 | | }
35 | / enum Food {
36 | | FoodGood,
37 | | FoodMiddle,
38 | | FoodBad,
39 | | }
| |_^
|
= help: remove the prefixes and use full paths to the variants instead of glob imports

error: All variants have the same prefix: `CallType`
--> $DIR/enum_variants.rs:44:1
--> $DIR/enum_variants.rs:45:1
|
44 | / enum BadCallType {
45 | | CallTypeCall,
46 | | CallTypeCreate,
47 | | CallTypeDestroy,
48 | | }
45 | / enum BadCallType {
46 | | CallTypeCall,
47 | | CallTypeCreate,
48 | | CallTypeDestroy,
49 | | }
| |_^
|
= help: remove the prefixes and use full paths to the variants instead of glob imports

error: All variants have the same prefix: `Constant`
--> $DIR/enum_variants.rs:56:1
--> $DIR/enum_variants.rs:57:1
|
56 | / enum Consts {
57 | | ConstantInt,
58 | | ConstantCake,
59 | | ConstantLie,
60 | | }
57 | / enum Consts {
58 | | ConstantInt,
59 | | ConstantCake,
60 | | ConstantLie,
61 | | }
| |_^
|
= help: remove the prefixes and use full paths to the variants instead of glob imports

error: All variants have the same prefix: `With`
--> $DIR/enum_variants.rs:90:1
--> $DIR/enum_variants.rs:91:1
|
90 | / enum Seallll {
91 | | WithOutCake,
92 | | WithOutTea,
93 | | WithOut,
94 | | }
91 | / enum Seallll {
92 | | WithOutCake,
93 | | WithOutTea,
94 | | WithOut,
95 | | }
| |_^
|
= 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:96:1
--> $DIR/enum_variants.rs:97:1
|
96 | / enum NonCaps {
97 | | Prefix的,
98 | | PrefixTea,
99 | | PrefixCake,
100 | | }
97 | / enum NonCaps {
98 | | Prefix的,
99 | | PrefixTea,
100 | | PrefixCake,
101 | | }
| |_^
|
= help: remove the prefixes and use full paths to the variants instead of glob imports

error: All variants have the same prefix: `With`
--> $DIR/enum_variants.rs:102:1
--> $DIR/enum_variants.rs:103:1
|
102 | / pub enum PubSeall {
103 | | WithOutCake,
104 | | WithOutTea,
105 | | WithOut,
106 | | }
103 | / pub enum PubSeall {
104 | | WithOutCake,
105 | | WithOutTea,
106 | | WithOut,
107 | | }
| |_^
|
= note: `-D clippy::pub-enum-variant-names` implied by `-D warnings`
Expand Down

0 comments on commit af14342

Please sign in to comment.