Skip to content

Commit af14342

Browse files
committed
Auto merge of #3581 - euclio:camel-case, r=flip1995
fix breakage from rust-lang/rust#57088
2 parents fc24fce + cd602c8 commit af14342

File tree

4 files changed

+51
-49
lines changed

4 files changed

+51
-49
lines changed

tests/ui/builtin-type-shadow.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// except according to those terms.
99

1010
#![warn(clippy::builtin_type_shadow)]
11+
#![allow(non_camel_case_types)]
1112

1213
fn foo<u32>(a: u32) -> u32 {
1314
42

tests/ui/builtin-type-shadow.stderr

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
error: This generic shadows the built-in type `u32`
2-
--> $DIR/builtin-type-shadow.rs:12:8
2+
--> $DIR/builtin-type-shadow.rs:13:8
33
|
4-
12 | fn foo<u32>(a: u32) -> u32 {
4+
13 | fn foo<u32>(a: u32) -> u32 {
55
| ^^^
66
|
77
= note: `-D clippy::builtin-type-shadow` implied by `-D warnings`
88

99
error[E0308]: mismatched types
10-
--> $DIR/builtin-type-shadow.rs:13:5
10+
--> $DIR/builtin-type-shadow.rs:14:5
1111
|
12-
12 | fn foo<u32>(a: u32) -> u32 {
12+
13 | fn foo<u32>(a: u32) -> u32 {
1313
| --- expected `u32` because of return type
14-
13 | 42
14+
14 | 42
1515
| ^^ expected type parameter, found integral variable
1616
|
1717
= note: expected type `u32`

tests/ui/enum_variants.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#![feature(non_ascii_idents)]
1111
#![warn(clippy::all, clippy::pub_enum_variant_names)]
12+
#![allow(non_camel_case_types)]
1213

1314
enum FakeCallType {
1415
CALL,

tests/ui/enum_variants.stderr

+44-44
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,97 @@
11
error: Variant name ends with the enum's name
2-
--> $DIR/enum_variants.rs:24:5
2+
--> $DIR/enum_variants.rs:25:5
33
|
4-
24 | cFoo,
4+
25 | cFoo,
55
| ^^^^
66
|
77
= note: `-D clippy::enum-variant-names` implied by `-D warnings`
88

99
error: Variant name starts with the enum's name
10-
--> $DIR/enum_variants.rs:35:5
10+
--> $DIR/enum_variants.rs:36:5
1111
|
12-
35 | FoodGood,
12+
36 | FoodGood,
1313
| ^^^^^^^^
1414

1515
error: Variant name starts with the enum's name
16-
--> $DIR/enum_variants.rs:36:5
16+
--> $DIR/enum_variants.rs:37:5
1717
|
18-
36 | FoodMiddle,
18+
37 | FoodMiddle,
1919
| ^^^^^^^^^^
2020

2121
error: Variant name starts with the enum's name
22-
--> $DIR/enum_variants.rs:37:5
22+
--> $DIR/enum_variants.rs:38:5
2323
|
24-
37 | FoodBad,
24+
38 | FoodBad,
2525
| ^^^^^^^
2626

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

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

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

6363
error: All variants have the same prefix: `With`
64-
--> $DIR/enum_variants.rs:90:1
64+
--> $DIR/enum_variants.rs:91:1
6565
|
66-
90 | / enum Seallll {
67-
91 | | WithOutCake,
68-
92 | | WithOutTea,
69-
93 | | WithOut,
70-
94 | | }
66+
91 | / enum Seallll {
67+
92 | | WithOutCake,
68+
93 | | WithOutTea,
69+
94 | | WithOut,
70+
95 | | }
7171
| |_^
7272
|
7373
= help: remove the prefixes and use full paths to the variants instead of glob imports
7474

7575
error: All variants have the same prefix: `Prefix`
76-
--> $DIR/enum_variants.rs:96:1
76+
--> $DIR/enum_variants.rs:97:1
7777
|
78-
96 | / enum NonCaps {
79-
97 | | Prefix的,
80-
98 | | PrefixTea,
81-
99 | | PrefixCake,
82-
100 | | }
78+
97 | / enum NonCaps {
79+
98 | | Prefix的,
80+
99 | | PrefixTea,
81+
100 | | PrefixCake,
82+
101 | | }
8383
| |_^
8484
|
8585
= help: remove the prefixes and use full paths to the variants instead of glob imports
8686

8787
error: All variants have the same prefix: `With`
88-
--> $DIR/enum_variants.rs:102:1
88+
--> $DIR/enum_variants.rs:103:1
8989
|
90-
102 | / pub enum PubSeall {
91-
103 | | WithOutCake,
92-
104 | | WithOutTea,
93-
105 | | WithOut,
94-
106 | | }
90+
103 | / pub enum PubSeall {
91+
104 | | WithOutCake,
92+
105 | | WithOutTea,
93+
106 | | WithOut,
94+
107 | | }
9595
| |_^
9696
|
9797
= note: `-D clippy::pub-enum-variant-names` implied by `-D warnings`

0 commit comments

Comments
 (0)