@@ -436,7 +436,7 @@ impl Module {
436436 }
437437
438438 let ( mut replacements, record_field_parents, impls) =
439- get_replacements_for_visibility_change ( & mut self . body_items , true ) ;
439+ get_replacements_for_visibility_change ( & mut self . body_items ) ;
440440
441441 let mut impl_items = impls
442442 . into_iter ( )
@@ -445,7 +445,7 @@ impl Module {
445445 . collect_vec ( ) ;
446446
447447 let ( mut impl_item_replacements, _, _) =
448- get_replacements_for_visibility_change ( & mut impl_items, true ) ;
448+ get_replacements_for_visibility_change ( & mut impl_items) ;
449449
450450 replacements. append ( & mut impl_item_replacements) ;
451451
@@ -793,7 +793,6 @@ fn check_def_in_mod_and_out_sel(
793793
794794fn get_replacements_for_visibility_change (
795795 items : & mut [ ast:: Item ] ,
796- is_clone_for_updated : bool ,
797796) -> (
798797 Vec < ( Option < ast:: Visibility > , SyntaxNode ) > ,
799798 Vec < ( Option < ast:: Visibility > , SyntaxNode ) > ,
@@ -804,9 +803,6 @@ fn get_replacements_for_visibility_change(
804803 let mut impls = Vec :: new ( ) ;
805804
806805 for item in items {
807- if !is_clone_for_updated {
808- * item = item. clone_for_update ( ) ;
809- }
810806 //Use stmts are ignored
811807 macro_rules! push_to_replacement {
812808 ( $it: ident) => {
0 commit comments