@@ -384,51 +384,57 @@ 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
- "should_assert_eq" ,
391
+ "clippy:: should_assert_eq" ,
390
392
"`assert!()` will be more flexible with RFC 2011" ,
391
393
) ;
392
394
store. register_removed (
393
- "extend_from_slice" ,
395
+ "clippy:: extend_from_slice" ,
394
396
"`.extend_from_slice(_)` is a faster way to extend a Vec by a slice" ,
395
397
) ;
396
398
store. register_removed (
397
- "range_step_by_zero" ,
399
+ "clippy:: range_step_by_zero" ,
398
400
"`iterator.step_by(0)` panics nowadays" ,
399
401
) ;
400
402
store. register_removed (
401
- "unstable_as_slice" ,
403
+ "clippy:: unstable_as_slice" ,
402
404
"`Vec::as_slice` has been stabilized in 1.7" ,
403
405
) ;
404
406
store. register_removed (
405
- "unstable_as_mut_slice" ,
407
+ "clippy:: unstable_as_mut_slice" ,
406
408
"`Vec::as_mut_slice` has been stabilized in 1.7" ,
407
409
) ;
408
410
store. register_removed (
409
- "str_to_string" ,
411
+ "clippy:: str_to_string" ,
410
412
"using `str::to_string` is common even today and specialization will likely happen soon" ,
411
413
) ;
412
414
store. register_removed (
413
- "string_to_string" ,
415
+ "clippy:: string_to_string" ,
414
416
"using `string::to_string` is common even today and specialization will likely happen soon" ,
415
417
) ;
416
418
store. register_removed (
417
- "misaligned_transmute" ,
419
+ "clippy:: misaligned_transmute" ,
418
420
"this lint has been split into cast_ptr_alignment and transmute_ptr_to_ptr" ,
419
421
) ;
420
422
store. register_removed (
421
- "assign_ops" ,
423
+ "clippy:: assign_ops" ,
422
424
"using compound assignment operators (e.g., `+=`) is harmless" ,
423
425
) ;
424
426
store. register_removed (
425
- "if_let_redundant_pattern_matching" ,
427
+ "clippy:: if_let_redundant_pattern_matching" ,
426
428
"this lint has been changed to redundant_pattern_matching" ,
427
429
) ;
428
430
store. register_removed (
429
- "unsafe_vector_initialization" ,
431
+ "clippy:: unsafe_vector_initialization" ,
430
432
"the replacement suggested by this lint had substantially different behavior" ,
431
433
) ;
434
+ store. register_removed (
435
+ "clippy::invalid_ref" ,
436
+ "superseded by rustc lint `invalid_value`" ,
437
+ ) ;
432
438
// end deprecated lints, do not remove this comment, it’s used in `update_lints`
433
439
434
440
reg. register_late_lint_pass ( box serde_api:: SerdeAPI ) ;
@@ -1166,6 +1172,54 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
1166
1172
] ) ;
1167
1173
}
1168
1174
1175
+ #[ rustfmt:: skip]
1176
+ fn register_removed_non_tool_lints ( store : & mut rustc:: lint:: LintStore ) {
1177
+ store. register_removed (
1178
+ "should_assert_eq" ,
1179
+ "`assert!()` will be more flexible with RFC 2011" ,
1180
+ ) ;
1181
+ store. register_removed (
1182
+ "extend_from_slice" ,
1183
+ "`.extend_from_slice(_)` is a faster way to extend a Vec by a slice" ,
1184
+ ) ;
1185
+ store. register_removed (
1186
+ "range_step_by_zero" ,
1187
+ "`iterator.step_by(0)` panics nowadays" ,
1188
+ ) ;
1189
+ store. register_removed (
1190
+ "unstable_as_slice" ,
1191
+ "`Vec::as_slice` has been stabilized in 1.7" ,
1192
+ ) ;
1193
+ store. register_removed (
1194
+ "unstable_as_mut_slice" ,
1195
+ "`Vec::as_mut_slice` has been stabilized in 1.7" ,
1196
+ ) ;
1197
+ store. register_removed (
1198
+ "str_to_string" ,
1199
+ "using `str::to_string` is common even today and specialization will likely happen soon" ,
1200
+ ) ;
1201
+ store. register_removed (
1202
+ "string_to_string" ,
1203
+ "using `string::to_string` is common even today and specialization will likely happen soon" ,
1204
+ ) ;
1205
+ store. register_removed (
1206
+ "misaligned_transmute" ,
1207
+ "this lint has been split into cast_ptr_alignment and transmute_ptr_to_ptr" ,
1208
+ ) ;
1209
+ store. register_removed (
1210
+ "assign_ops" ,
1211
+ "using compound assignment operators (e.g., `+=`) is harmless" ,
1212
+ ) ;
1213
+ store. register_removed (
1214
+ "if_let_redundant_pattern_matching" ,
1215
+ "this lint has been changed to redundant_pattern_matching" ,
1216
+ ) ;
1217
+ store. register_removed (
1218
+ "unsafe_vector_initialization" ,
1219
+ "the replacement suggested by this lint had substantially different behavior" ,
1220
+ ) ;
1221
+ }
1222
+
1169
1223
/// Register renamed lints.
1170
1224
///
1171
1225
/// Used in `./src/driver.rs`.
0 commit comments