@@ -325,6 +325,7 @@ mod unwrap;
325325mod use_self;
326326mod useless_conversion;
327327mod vec;
328+ mod vec_resize_to_zero;
328329mod verbose_file_reads;
329330mod wildcard_dependencies;
330331mod wildcard_imports;
@@ -847,6 +848,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
847848 & utils:: internal_lints:: OUTER_EXPN_EXPN_DATA ,
848849 & utils:: internal_lints:: PRODUCE_ICE ,
849850 & vec:: USELESS_VEC ,
851+ & vec_resize_to_zero:: VEC_RESIZE_TO_ZERO ,
850852 & verbose_file_reads:: VERBOSE_FILE_READS ,
851853 & wildcard_dependencies:: WILDCARD_DEPENDENCIES ,
852854 & wildcard_imports:: ENUM_GLOB_USE ,
@@ -1062,6 +1064,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
10621064 store. register_early_pass ( || box manual_non_exhaustive:: ManualNonExhaustive ) ;
10631065 store. register_late_pass ( || box manual_async_fn:: ManualAsyncFn ) ;
10641066 store. register_early_pass ( || box redundant_field_names:: RedundantFieldNames ) ;
1067+ store. register_late_pass ( || box vec_resize_to_zero:: VecResizeToZero ) ;
10651068 let single_char_binding_names_threshold = conf. single_char_binding_names_threshold ;
10661069 store. register_early_pass ( move || box non_expressive_names:: NonExpressiveNames {
10671070 single_char_binding_names_threshold,
@@ -1430,6 +1433,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
14301433 LintId :: of( & unwrap:: UNNECESSARY_UNWRAP ) ,
14311434 LintId :: of( & useless_conversion:: USELESS_CONVERSION ) ,
14321435 LintId :: of( & vec:: USELESS_VEC ) ,
1436+ LintId :: of( & vec_resize_to_zero:: VEC_RESIZE_TO_ZERO ) ,
14331437 LintId :: of( & write:: PRINTLN_EMPTY_STRING ) ,
14341438 LintId :: of( & write:: PRINT_LITERAL ) ,
14351439 LintId :: of( & write:: PRINT_WITH_NEWLINE ) ,
@@ -1677,6 +1681,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
16771681 LintId :: of( & unnamed_address:: VTABLE_ADDRESS_COMPARISONS ) ,
16781682 LintId :: of( & unused_io_amount:: UNUSED_IO_AMOUNT ) ,
16791683 LintId :: of( & unwrap:: PANICKING_UNWRAP ) ,
1684+ LintId :: of( & vec_resize_to_zero:: VEC_RESIZE_TO_ZERO ) ,
16801685 ] ) ;
16811686
16821687 store. register_group ( true , "clippy::perf" , Some ( "clippy_perf" ) , vec ! [
0 commit comments