diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-09-28 00:20:32 +0200 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2023-09-28 00:20:32 +0200 |
| commit | e8a33847fd1d92a50d53287c737670d1a8f80df0 (patch) | |
| tree | abbab78ec7fded868c9f6152567df477dc5b6ea1 /compiler/stable_mir/src/fold.rs | |
| parent | fd95627134e85f56f2e162790f56943b407f1a34 (diff) | |
| download | rust-e8a33847fd1d92a50d53287c737670d1a8f80df0.tar.gz rust-e8a33847fd1d92a50d53287c737670d1a8f80df0.zip | |
don't clone copy types
Diffstat (limited to 'compiler/stable_mir/src/fold.rs')
| -rw-r--r-- | compiler/stable_mir/src/fold.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/stable_mir/src/fold.rs b/compiler/stable_mir/src/fold.rs index 16ae62311aa..1da123e922b 100644 --- a/compiler/stable_mir/src/fold.rs +++ b/compiler/stable_mir/src/fold.rs @@ -81,7 +81,7 @@ impl Foldable for UnevaluatedConst { 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 @@ impl<T: Foldable> Foldable for Option<T> { impl Foldable for Promoted { fn super_fold<V: Folder>(&self, _folder: &mut V) -> ControlFlow<V::Break, Self> { - ControlFlow::Continue(self.clone()) + ControlFlow::Continue(*self) } } |
