@@ -384,6 +384,8 @@ pub fn read_conf(reg: &rustc_plugin::Registry<'_>) -> Conf {
384
384
#[ rustfmt:: skip]
385
385
pub fn register_plugins ( reg : & mut rustc_plugin:: Registry < ' _ > , conf : & Conf ) {
386
386
let mut store = reg. sess . lint_store . borrow_mut ( ) ;
387
+ register_removed_non_tool_lints ( & mut store) ;
388
+
387
389
// begin deprecated lints, do not remove this comment, it’s used in `update_lints`
388
390
store. register_removed (
389
391
"clippy::should_assert_eq" ,
@@ -1164,6 +1166,54 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
1164
1166
] ) ;
1165
1167
}
1166
1168
1169
+ #[ rustfmt:: skip]
1170
+ fn register_removed_non_tool_lints ( store : & mut rustc:: lint:: LintStore ) {
1171
+ store. register_removed (
1172
+ "should_assert_eq" ,
1173
+ "`assert!()` will be more flexible with RFC 2011" ,
1174
+ ) ;
1175
+ store. register_removed (
1176
+ "extend_from_slice" ,
1177
+ "`.extend_from_slice(_)` is a faster way to extend a Vec by a slice" ,
1178
+ ) ;
1179
+ store. register_removed (
1180
+ "range_step_by_zero" ,
1181
+ "`iterator.step_by(0)` panics nowadays" ,
1182
+ ) ;
1183
+ store. register_removed (
1184
+ "unstable_as_slice" ,
1185
+ "`Vec::as_slice` has been stabilized in 1.7" ,
1186
+ ) ;
1187
+ store. register_removed (
1188
+ "unstable_as_mut_slice" ,
1189
+ "`Vec::as_mut_slice` has been stabilized in 1.7" ,
1190
+ ) ;
1191
+ store. register_removed (
1192
+ "str_to_string" ,
1193
+ "using `str::to_string` is common even today and specialization will likely happen soon" ,
1194
+ ) ;
1195
+ store. register_removed (
1196
+ "string_to_string" ,
1197
+ "using `string::to_string` is common even today and specialization will likely happen soon" ,
1198
+ ) ;
1199
+ store. register_removed (
1200
+ "misaligned_transmute" ,
1201
+ "this lint has been split into cast_ptr_alignment and transmute_ptr_to_ptr" ,
1202
+ ) ;
1203
+ store. register_removed (
1204
+ "assign_ops" ,
1205
+ "using compound assignment operators (e.g., `+=`) is harmless" ,
1206
+ ) ;
1207
+ store. register_removed (
1208
+ "if_let_redundant_pattern_matching" ,
1209
+ "this lint has been changed to redundant_pattern_matching" ,
1210
+ ) ;
1211
+ store. register_removed (
1212
+ "unsafe_vector_initialization" ,
1213
+ "the replacement suggested by this lint had substantially different behavior" ,
1214
+ ) ;
1215
+ }
1216
+
1167
1217
/// Register renamed lints.
1168
1218
///
1169
1219
/// Used in `./src/driver.rs`.
0 commit comments