@@ -21,6 +21,7 @@ declare_deprecated_lint! {
21
21
/// ### Deprecation reason
22
22
/// This used to check for `assert!(a == b)` and recommend
23
23
/// replacement with `assert_eq!(a, b)`, but this is no longer needed after RFC 2011.
24
+ #[ clippy:: version = "pre 1.29.0" ]
24
25
pub SHOULD_ASSERT_EQ ,
25
26
"`assert!()` will be more flexible with RFC 2011"
26
27
}
@@ -32,6 +33,7 @@ declare_deprecated_lint! {
32
33
/// ### Deprecation reason
33
34
/// This used to check for `Vec::extend`, which was slower than
34
35
/// `Vec::extend_from_slice`. Thanks to specialization, this is no longer true.
36
+ #[ clippy:: version = "pre 1.29.0" ]
35
37
pub EXTEND_FROM_SLICE ,
36
38
"`.extend_from_slice(_)` is a faster way to extend a Vec by a slice"
37
39
}
@@ -45,6 +47,7 @@ declare_deprecated_lint! {
45
47
/// an infinite iterator, which is better expressed by `iter::repeat`,
46
48
/// but the method has been removed for `Iterator::step_by` which panics
47
49
/// if given a zero
50
+ #[ clippy:: version = "pre 1.29.0" ]
48
51
pub RANGE_STEP_BY_ZERO ,
49
52
"`iterator.step_by(0)` panics nowadays"
50
53
}
@@ -56,6 +59,7 @@ declare_deprecated_lint! {
56
59
/// ### Deprecation reason
57
60
/// This used to check for `Vec::as_slice`, which was unstable with good
58
61
/// stable alternatives. `Vec::as_slice` has now been stabilized.
62
+ #[ clippy:: version = "pre 1.29.0" ]
59
63
pub UNSTABLE_AS_SLICE ,
60
64
"`Vec::as_slice` has been stabilized in 1.7"
61
65
}
@@ -67,6 +71,7 @@ declare_deprecated_lint! {
67
71
/// ### Deprecation reason
68
72
/// This used to check for `Vec::as_mut_slice`, which was unstable with good
69
73
/// stable alternatives. `Vec::as_mut_slice` has now been stabilized.
74
+ #[ clippy:: version = "pre 1.29.0" ]
70
75
pub UNSTABLE_AS_MUT_SLICE ,
71
76
"`Vec::as_mut_slice` has been stabilized in 1.7"
72
77
}
@@ -80,6 +85,7 @@ declare_deprecated_lint! {
80
85
/// between non-pointer types of differing alignment is well-defined behavior (it's semantically
81
86
/// equivalent to a memcpy). This lint has thus been refactored into two separate lints:
82
87
/// cast_ptr_alignment and transmute_ptr_to_ptr.
88
+ #[ clippy:: version = "pre 1.29.0" ]
83
89
pub MISALIGNED_TRANSMUTE ,
84
90
"this lint has been split into cast_ptr_alignment and transmute_ptr_to_ptr"
85
91
}
@@ -92,6 +98,7 @@ declare_deprecated_lint! {
92
98
/// This lint is too subjective, not having a good reason for being in clippy.
93
99
/// Additionally, compound assignment operators may be overloaded separately from their non-assigning
94
100
/// counterparts, so this lint may suggest a change in behavior or the code may not compile.
101
+ #[ clippy:: version = "1.30.0" ]
95
102
pub ASSIGN_OPS ,
96
103
"using compound assignment operators (e.g., `+=`) is harmless"
97
104
}
@@ -104,6 +111,7 @@ declare_deprecated_lint! {
104
111
/// The original rule will only lint for `if let`. After
105
112
/// making it support to lint `match`, naming as `if let` is not suitable for it.
106
113
/// So, this lint is deprecated.
114
+ #[ clippy:: version = "pre 1.29.0" ]
107
115
pub IF_LET_REDUNDANT_PATTERN_MATCHING ,
108
116
"this lint has been changed to redundant_pattern_matching"
109
117
}
@@ -117,6 +125,7 @@ declare_deprecated_lint! {
117
125
/// Vec::with_capacity(n); vec.set_len(n);` with `let vec = vec![0; n];`. The
118
126
/// replacement has very different performance characteristics so the lint is
119
127
/// deprecated.
128
+ #[ clippy:: version = "pre 1.29.0" ]
120
129
pub UNSAFE_VECTOR_INITIALIZATION ,
121
130
"the replacement suggested by this lint had substantially different behavior"
122
131
}
@@ -127,6 +136,7 @@ declare_deprecated_lint! {
127
136
///
128
137
/// ### Deprecation reason
129
138
/// This lint has been superseded by #[must_use] in rustc.
139
+ #[ clippy:: version = "1.39.0" ]
130
140
pub UNUSED_COLLECT ,
131
141
"`collect` has been marked as #[must_use] in rustc and that covers all cases of this lint"
132
142
}
@@ -137,6 +147,7 @@ declare_deprecated_lint! {
137
147
///
138
148
/// ### Deprecation reason
139
149
/// Associated-constants are now preferred.
150
+ #[ clippy:: version = "1.44.0" ]
140
151
pub REPLACE_CONSTS ,
141
152
"associated-constants `MIN`/`MAX` of integers are preferred to `{min,max}_value()` and module constants"
142
153
}
@@ -147,6 +158,7 @@ declare_deprecated_lint! {
147
158
///
148
159
/// ### Deprecation reason
149
160
/// The regex! macro does not exist anymore.
161
+ #[ clippy:: version = "1.47.0" ]
150
162
pub REGEX_MACRO ,
151
163
"the regex! macro has been removed from the regex crate in 2018"
152
164
}
@@ -158,6 +170,7 @@ declare_deprecated_lint! {
158
170
/// ### Deprecation reason
159
171
/// This lint has been replaced by `manual_find_map`, a
160
172
/// more specific lint.
173
+ #[ clippy:: version = "1.51.0" ]
161
174
pub FIND_MAP ,
162
175
"this lint has been replaced by `manual_find_map`, a more specific lint"
163
176
}
@@ -169,6 +182,7 @@ declare_deprecated_lint! {
169
182
/// ### Deprecation reason
170
183
/// This lint has been replaced by `manual_filter_map`, a
171
184
/// more specific lint.
185
+ #[ clippy:: version = "1.53.0" ]
172
186
pub FILTER_MAP ,
173
187
"this lint has been replaced by `manual_filter_map`, a more specific lint"
174
188
}
@@ -181,6 +195,7 @@ declare_deprecated_lint! {
181
195
/// The `avoid_breaking_exported_api` config option was added, which
182
196
/// enables the `enum_variant_names` lint for public items.
183
197
/// ```
198
+ #[ clippy:: version = "1.54.0" ]
184
199
pub PUB_ENUM_VARIANT_NAMES ,
185
200
"set the `avoid-breaking-exported-api` config option to `false` to enable the `enum_variant_names` lint for public items"
186
201
}
@@ -192,6 +207,7 @@ declare_deprecated_lint! {
192
207
/// ### Deprecation reason
193
208
/// The `avoid_breaking_exported_api` config option was added, which
194
209
/// enables the `wrong_self_conversion` lint for public items.
210
+ #[ clippy:: version = "1.54.0" ]
195
211
pub WRONG_PUB_SELF_CONVENTION ,
196
212
"set the `avoid-breaking-exported-api` config option to `false` to enable the `wrong_self_convention` lint for public items"
197
213
}
0 commit comments