@@ -384,51 +384,57 @@ pub fn read_conf(reg: &rustc_plugin::Registry<'_>) -> Conf {
384384#[ rustfmt:: skip]
385385pub fn register_plugins ( reg : & mut rustc_plugin:: Registry < ' _ > , conf : & Conf ) {
386386 let mut store = reg. sess . lint_store . borrow_mut ( ) ;
387+ register_removed_non_tool_lints ( & mut store) ;
388+
387389 // begin deprecated lints, do not remove this comment, it’s used in `update_lints`
388390 store. register_removed (
389- "should_assert_eq" ,
391+ "clippy:: should_assert_eq" ,
390392 "`assert!()` will be more flexible with RFC 2011" ,
391393 ) ;
392394 store. register_removed (
393- "extend_from_slice" ,
395+ "clippy:: extend_from_slice" ,
394396 "`.extend_from_slice(_)` is a faster way to extend a Vec by a slice" ,
395397 ) ;
396398 store. register_removed (
397- "range_step_by_zero" ,
399+ "clippy:: range_step_by_zero" ,
398400 "`iterator.step_by(0)` panics nowadays" ,
399401 ) ;
400402 store. register_removed (
401- "unstable_as_slice" ,
403+ "clippy:: unstable_as_slice" ,
402404 "`Vec::as_slice` has been stabilized in 1.7" ,
403405 ) ;
404406 store. register_removed (
405- "unstable_as_mut_slice" ,
407+ "clippy:: unstable_as_mut_slice" ,
406408 "`Vec::as_mut_slice` has been stabilized in 1.7" ,
407409 ) ;
408410 store. register_removed (
409- "str_to_string" ,
411+ "clippy:: str_to_string" ,
410412 "using `str::to_string` is common even today and specialization will likely happen soon" ,
411413 ) ;
412414 store. register_removed (
413- "string_to_string" ,
415+ "clippy:: string_to_string" ,
414416 "using `string::to_string` is common even today and specialization will likely happen soon" ,
415417 ) ;
416418 store. register_removed (
417- "misaligned_transmute" ,
419+ "clippy:: misaligned_transmute" ,
418420 "this lint has been split into cast_ptr_alignment and transmute_ptr_to_ptr" ,
419421 ) ;
420422 store. register_removed (
421- "assign_ops" ,
423+ "clippy:: assign_ops" ,
422424 "using compound assignment operators (e.g., `+=`) is harmless" ,
423425 ) ;
424426 store. register_removed (
425- "if_let_redundant_pattern_matching" ,
427+ "clippy:: if_let_redundant_pattern_matching" ,
426428 "this lint has been changed to redundant_pattern_matching" ,
427429 ) ;
428430 store. register_removed (
429- "unsafe_vector_initialization" ,
431+ "clippy:: unsafe_vector_initialization" ,
430432 "the replacement suggested by this lint had substantially different behavior" ,
431433 ) ;
434+ store. register_removed (
435+ "clippy::invalid_ref" ,
436+ "superseded by rustc lint `invalid_value`" ,
437+ ) ;
432438 // end deprecated lints, do not remove this comment, it’s used in `update_lints`
433439
434440 reg. register_late_lint_pass ( box serde_api:: SerdeAPI ) ;
@@ -1166,6 +1172,54 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
11661172 ] ) ;
11671173}
11681174
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+
11691223/// Register renamed lints.
11701224///
11711225/// Used in `./src/driver.rs`.
0 commit comments