File tree 2 files changed +3
-3
lines changed
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(
1374
1374
// make astconv happy.
1375
1375
let mut path_segments = ast_trait_ref. path . segments . to_vec ( ) ;
1376
1376
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 ( ) ;
1378
1378
let last_arg = args. args . len ( ) - 1 ;
1379
1379
assert ! ( matches!( args. args[ last_arg] , hir:: GenericArg :: Const ( anon_const) if tcx. has_attr( anon_const. value. def_id, sym:: rustc_host) ) ) ;
1380
1380
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 {
81
81
82
82
impl Foldable for ConstDef {
83
83
fn super_fold < V : Folder > ( & self , _folder : & mut V ) -> ControlFlow < V :: Break , Self > {
84
- ControlFlow :: Continue ( self . clone ( ) )
84
+ ControlFlow :: Continue ( * self )
85
85
}
86
86
}
87
87
@@ -96,7 +96,7 @@ impl<T: Foldable> Foldable for Option<T> {
96
96
97
97
impl Foldable for Promoted {
98
98
fn super_fold < V : Folder > ( & self , _folder : & mut V ) -> ControlFlow < V :: Break , Self > {
99
- ControlFlow :: Continue ( self . clone ( ) )
99
+ ControlFlow :: Continue ( * self )
100
100
}
101
101
}
102
102
You can’t perform that action at this time.
0 commit comments