@@ -325,6 +325,7 @@ mod unwrap;
325
325
mod use_self;
326
326
mod useless_conversion;
327
327
mod vec;
328
+ mod vec_resize_to_zero;
328
329
mod verbose_file_reads;
329
330
mod wildcard_dependencies;
330
331
mod wildcard_imports;
@@ -847,6 +848,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
847
848
& utils:: internal_lints:: OUTER_EXPN_EXPN_DATA ,
848
849
& utils:: internal_lints:: PRODUCE_ICE ,
849
850
& vec:: USELESS_VEC ,
851
+ & vec_resize_to_zero:: VEC_RESIZE_TO_ZERO ,
850
852
& verbose_file_reads:: VERBOSE_FILE_READS ,
851
853
& wildcard_dependencies:: WILDCARD_DEPENDENCIES ,
852
854
& wildcard_imports:: ENUM_GLOB_USE ,
@@ -1062,6 +1064,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1062
1064
store. register_early_pass ( || box manual_non_exhaustive:: ManualNonExhaustive ) ;
1063
1065
store. register_late_pass ( || box manual_async_fn:: ManualAsyncFn ) ;
1064
1066
store. register_early_pass ( || box redundant_field_names:: RedundantFieldNames ) ;
1067
+ store. register_late_pass ( || box vec_resize_to_zero:: VecResizeToZero ) ;
1065
1068
let single_char_binding_names_threshold = conf. single_char_binding_names_threshold ;
1066
1069
store. register_early_pass ( move || box non_expressive_names:: NonExpressiveNames {
1067
1070
single_char_binding_names_threshold,
@@ -1430,6 +1433,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1430
1433
LintId :: of( & unwrap:: UNNECESSARY_UNWRAP ) ,
1431
1434
LintId :: of( & useless_conversion:: USELESS_CONVERSION ) ,
1432
1435
LintId :: of( & vec:: USELESS_VEC ) ,
1436
+ LintId :: of( & vec_resize_to_zero:: VEC_RESIZE_TO_ZERO ) ,
1433
1437
LintId :: of( & write:: PRINTLN_EMPTY_STRING ) ,
1434
1438
LintId :: of( & write:: PRINT_LITERAL ) ,
1435
1439
LintId :: of( & write:: PRINT_WITH_NEWLINE ) ,
@@ -1677,6 +1681,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1677
1681
LintId :: of( & unnamed_address:: VTABLE_ADDRESS_COMPARISONS ) ,
1678
1682
LintId :: of( & unused_io_amount:: UNUSED_IO_AMOUNT ) ,
1679
1683
LintId :: of( & unwrap:: PANICKING_UNWRAP ) ,
1684
+ LintId :: of( & vec_resize_to_zero:: VEC_RESIZE_TO_ZERO ) ,
1680
1685
] ) ;
1681
1686
1682
1687
store. register_group ( true , "clippy::perf" , Some ( "clippy_perf" ) , vec ! [
0 commit comments