don't clone copy types
This commit is contained in:
parent
fd95627134
commit
e8a33847fd
@ -1374,7 +1374,7 @@ fn impl_trait_ref(
|
||||
// make astconv happy.
|
||||
let mut path_segments = ast_trait_ref.path.segments.to_vec();
|
||||
let last_segment = path_segments.len() - 1;
|
||||
let mut args = path_segments[last_segment].args().clone();
|
||||
let mut args = *path_segments[last_segment].args();
|
||||
let last_arg = args.args.len() - 1;
|
||||
assert!(matches!(args.args[last_arg], hir::GenericArg::Const(anon_const) if tcx.has_attr(anon_const.value.def_id, sym::rustc_host)));
|
||||
args.args = &args.args[..args.args.len() - 1];
|
||||
|
@ -81,7 +81,7 @@ fn super_fold<V: Folder>(&self, folder: &mut V) -> ControlFlow<V::Break, Self> {
|
||||
|
||||
impl Foldable for ConstDef {
|
||||
fn super_fold<V: Folder>(&self, _folder: &mut V) -> ControlFlow<V::Break, Self> {
|
||||
ControlFlow::Continue(self.clone())
|
||||
ControlFlow::Continue(*self)
|
||||
}
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ fn super_fold<V: Folder>(&self, folder: &mut V) -> ControlFlow<V::Break, Self> {
|
||||
|
||||
impl Foldable for Promoted {
|
||||
fn super_fold<V: Folder>(&self, _folder: &mut V) -> ControlFlow<V::Break, Self> {
|
||||
ControlFlow::Continue(self.clone())
|
||||
ControlFlow::Continue(*self)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user