File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1374,7 +1374,7 @@ fn impl_trait_ref(
13741374 // make astconv happy.
13751375 let mut path_segments = ast_trait_ref. path . segments . to_vec ( ) ;
13761376 let last_segment = path_segments. len ( ) - 1 ;
1377- let mut args = path_segments[ last_segment] . args ( ) . clone ( ) ;
1377+ let mut args = * path_segments[ last_segment] . args ( ) ;
13781378 let last_arg = args. args . len ( ) - 1 ;
13791379 assert ! ( matches!( args. args[ last_arg] , hir:: GenericArg :: Const ( anon_const) if tcx. has_attr( anon_const. value. def_id, sym:: rustc_host) ) ) ;
13801380 args. args = & args. args [ ..args. args . len ( ) - 1 ] ;
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ impl Foldable for UnevaluatedConst {
8181
8282impl Foldable for ConstDef {
8383 fn super_fold < V : Folder > ( & self , _folder : & mut V ) -> ControlFlow < V :: Break , Self > {
84- ControlFlow :: Continue ( self . clone ( ) )
84+ ControlFlow :: Continue ( * self )
8585 }
8686}
8787
@@ -96,7 +96,7 @@ impl<T: Foldable> Foldable for Option<T> {
9696
9797impl Foldable for Promoted {
9898 fn super_fold < V : Folder > ( & self , _folder : & mut V ) -> ControlFlow < V :: Break , Self > {
99- ControlFlow :: Continue ( self . clone ( ) )
99+ ControlFlow :: Continue ( * self )
100100 }
101101}
102102
You can’t perform that action at this time.
0 commit comments