Skip to content

Commit e552267

Browse files
committed
style -> pedantic
1 parent 2953cba commit e552267

File tree

6 files changed

+32
-34
lines changed

6 files changed

+32
-34
lines changed

clippy_lints/src/empty_structs_with_brackets.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ declare_clippy_lint! {
2323
/// ```
2424
#[clippy::version = "1.62.0"]
2525
pub EMPTY_STRUCTS_WITH_BRACKETS,
26-
style,
26+
pedantic,
2727
"finds struct declarations with empty brackets"
2828
}
2929
declare_lint_pass!(EmptyStructsWithBrackets => [EMPTY_STRUCTS_WITH_BRACKETS]);

clippy_lints/src/lib.register_all.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ store.register_group(true, "clippy::all", Some("clippy_all"), vec![
5454
LintId::of(drop_forget_ref::FORGET_COPY),
5555
LintId::of(drop_forget_ref::FORGET_REF),
5656
LintId::of(duration_subsec::DURATION_SUBSEC),
57-
LintId::of(empty_structs_with_brackets::EMPTY_STRUCTS_WITH_BRACKETS),
5857
LintId::of(entry::MAP_ENTRY),
5958
LintId::of(enum_clike::ENUM_CLIKE_UNPORTABLE_VARIANT),
6059
LintId::of(enum_variants::ENUM_VARIANT_NAMES),

clippy_lints/src/lib.register_pedantic.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ store.register_group(true, "clippy::pedantic", Some("clippy_pedantic"), vec![
2727
LintId::of(doc::MISSING_ERRORS_DOC),
2828
LintId::of(doc::MISSING_PANICS_DOC),
2929
LintId::of(empty_enum::EMPTY_ENUM),
30+
LintId::of(empty_structs_with_brackets::EMPTY_STRUCTS_WITH_BRACKETS),
3031
LintId::of(enum_variants::MODULE_NAME_REPETITIONS),
3132
LintId::of(eta_reduction::REDUNDANT_CLOSURE_FOR_METHOD_CALLS),
3233
LintId::of(excessive_bools::FN_PARAMS_EXCESSIVE_BOOLS),

clippy_lints/src/lib.register_style.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ store.register_group(true, "clippy::style", Some("clippy_style"), vec![
2020
LintId::of(disallowed_types::DISALLOWED_TYPES),
2121
LintId::of(doc::MISSING_SAFETY_DOC),
2222
LintId::of(doc::NEEDLESS_DOCTEST_MAIN),
23-
LintId::of(empty_structs_with_brackets::EMPTY_STRUCTS_WITH_BRACKETS),
2423
LintId::of(enum_variants::ENUM_VARIANT_NAMES),
2524
LintId::of(enum_variants::MODULE_INCEPTION),
2625
LintId::of(eq_op::OP_REF),

tests/ui/no_effect.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ impl FnOnce<(&str,)> for GreetStruct1 {
6868
}
6969
}
7070

71-
#[allow(clippy::empty_structs_with_brackets)]
7271
struct GreetStruct2();
7372

7473
impl FnOnce<(&str,)> for GreetStruct2 {

tests/ui/no_effect.stderr

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,183 +1,183 @@
11
error: statement with no effect
2-
--> $DIR/no_effect.rs:96:5
2+
--> $DIR/no_effect.rs:95:5
33
|
44
LL | 0;
55
| ^^
66
|
77
= note: `-D clippy::no-effect` implied by `-D warnings`
88

99
error: statement with no effect
10-
--> $DIR/no_effect.rs:97:5
10+
--> $DIR/no_effect.rs:96:5
1111
|
1212
LL | s2;
1313
| ^^^
1414

1515
error: statement with no effect
16-
--> $DIR/no_effect.rs:98:5
16+
--> $DIR/no_effect.rs:97:5
1717
|
1818
LL | Unit;
1919
| ^^^^^
2020

2121
error: statement with no effect
22-
--> $DIR/no_effect.rs:99:5
22+
--> $DIR/no_effect.rs:98:5
2323
|
2424
LL | Tuple(0);
2525
| ^^^^^^^^^
2626

2727
error: statement with no effect
28-
--> $DIR/no_effect.rs:100:5
28+
--> $DIR/no_effect.rs:99:5
2929
|
3030
LL | Struct { field: 0 };
3131
| ^^^^^^^^^^^^^^^^^^^^
3232

3333
error: statement with no effect
34-
--> $DIR/no_effect.rs:101:5
34+
--> $DIR/no_effect.rs:100:5
3535
|
3636
LL | Struct { ..s };
3737
| ^^^^^^^^^^^^^^^
3838

3939
error: statement with no effect
40-
--> $DIR/no_effect.rs:102:5
40+
--> $DIR/no_effect.rs:101:5
4141
|
4242
LL | Union { a: 0 };
4343
| ^^^^^^^^^^^^^^^
4444

4545
error: statement with no effect
46-
--> $DIR/no_effect.rs:103:5
46+
--> $DIR/no_effect.rs:102:5
4747
|
4848
LL | Enum::Tuple(0);
4949
| ^^^^^^^^^^^^^^^
5050

5151
error: statement with no effect
52-
--> $DIR/no_effect.rs:104:5
52+
--> $DIR/no_effect.rs:103:5
5353
|
5454
LL | Enum::Struct { field: 0 };
5555
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
5656

5757
error: statement with no effect
58-
--> $DIR/no_effect.rs:105:5
58+
--> $DIR/no_effect.rs:104:5
5959
|
6060
LL | 5 + 6;
6161
| ^^^^^^
6262

6363
error: statement with no effect
64-
--> $DIR/no_effect.rs:106:5
64+
--> $DIR/no_effect.rs:105:5
6565
|
6666
LL | *&42;
6767
| ^^^^^
6868

6969
error: statement with no effect
70-
--> $DIR/no_effect.rs:107:5
70+
--> $DIR/no_effect.rs:106:5
7171
|
7272
LL | &6;
7373
| ^^^
7474

7575
error: statement with no effect
76-
--> $DIR/no_effect.rs:108:5
76+
--> $DIR/no_effect.rs:107:5
7777
|
7878
LL | (5, 6, 7);
7979
| ^^^^^^^^^^
8080

8181
error: statement with no effect
82-
--> $DIR/no_effect.rs:109:5
82+
--> $DIR/no_effect.rs:108:5
8383
|
8484
LL | box 42;
8585
| ^^^^^^^
8686

8787
error: statement with no effect
88-
--> $DIR/no_effect.rs:110:5
88+
--> $DIR/no_effect.rs:109:5
8989
|
9090
LL | ..;
9191
| ^^^
9292

9393
error: statement with no effect
94-
--> $DIR/no_effect.rs:111:5
94+
--> $DIR/no_effect.rs:110:5
9595
|
9696
LL | 5..;
9797
| ^^^^
9898

9999
error: statement with no effect
100-
--> $DIR/no_effect.rs:112:5
100+
--> $DIR/no_effect.rs:111:5
101101
|
102102
LL | ..5;
103103
| ^^^^
104104

105105
error: statement with no effect
106-
--> $DIR/no_effect.rs:113:5
106+
--> $DIR/no_effect.rs:112:5
107107
|
108108
LL | 5..6;
109109
| ^^^^^
110110

111111
error: statement with no effect
112-
--> $DIR/no_effect.rs:114:5
112+
--> $DIR/no_effect.rs:113:5
113113
|
114114
LL | 5..=6;
115115
| ^^^^^^
116116

117117
error: statement with no effect
118-
--> $DIR/no_effect.rs:115:5
118+
--> $DIR/no_effect.rs:114:5
119119
|
120120
LL | [42, 55];
121121
| ^^^^^^^^^
122122

123123
error: statement with no effect
124-
--> $DIR/no_effect.rs:116:5
124+
--> $DIR/no_effect.rs:115:5
125125
|
126126
LL | [42, 55][1];
127127
| ^^^^^^^^^^^^
128128

129129
error: statement with no effect
130-
--> $DIR/no_effect.rs:117:5
130+
--> $DIR/no_effect.rs:116:5
131131
|
132132
LL | (42, 55).1;
133133
| ^^^^^^^^^^^
134134

135135
error: statement with no effect
136-
--> $DIR/no_effect.rs:118:5
136+
--> $DIR/no_effect.rs:117:5
137137
|
138138
LL | [42; 55];
139139
| ^^^^^^^^^
140140

141141
error: statement with no effect
142-
--> $DIR/no_effect.rs:119:5
142+
--> $DIR/no_effect.rs:118:5
143143
|
144144
LL | [42; 55][13];
145145
| ^^^^^^^^^^^^^
146146

147147
error: statement with no effect
148-
--> $DIR/no_effect.rs:121:5
148+
--> $DIR/no_effect.rs:120:5
149149
|
150150
LL | || x += 5;
151151
| ^^^^^^^^^^
152152

153153
error: statement with no effect
154-
--> $DIR/no_effect.rs:123:5
154+
--> $DIR/no_effect.rs:122:5
155155
|
156156
LL | FooString { s: s };
157157
| ^^^^^^^^^^^^^^^^^^^
158158

159159
error: binding to `_` prefixed variable with no side-effect
160-
--> $DIR/no_effect.rs:124:5
160+
--> $DIR/no_effect.rs:123:5
161161
|
162162
LL | let _unused = 1;
163163
| ^^^^^^^^^^^^^^^^
164164
|
165165
= note: `-D clippy::no-effect-underscore-binding` implied by `-D warnings`
166166

167167
error: binding to `_` prefixed variable with no side-effect
168-
--> $DIR/no_effect.rs:125:5
168+
--> $DIR/no_effect.rs:124:5
169169
|
170170
LL | let _penguin = || println!("Some helpful closure");
171171
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
172172

173173
error: binding to `_` prefixed variable with no side-effect
174-
--> $DIR/no_effect.rs:126:5
174+
--> $DIR/no_effect.rs:125:5
175175
|
176176
LL | let _duck = Struct { field: 0 };
177177
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
178178

179179
error: binding to `_` prefixed variable with no side-effect
180-
--> $DIR/no_effect.rs:127:5
180+
--> $DIR/no_effect.rs:126:5
181181
|
182182
LL | let _cat = [2, 4, 6, 8][2];
183183
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)