diff options
| author | bors <bors@rust-lang.org> | 2022-08-28 18:31:08 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-08-28 18:31:08 +0000 |
| commit | ce36e88256f09078519f8bc6b21e4dc88f88f523 (patch) | |
| tree | be5fdfdcd24afdbc4510741b227587f9294efdc7 /compiler/rustc_trait_selection/src | |
| parent | 223d16ebbde1bd309c58e853b053e14318e56b0e (diff) | |
| parent | 4eebcb9910c1180791b0e5dba5b3192d0e0046a4 (diff) | |
| download | rust-ce36e88256f09078519f8bc6b21e4dc88f88f523.tar.gz rust-ce36e88256f09078519f8bc6b21e4dc88f88f523.zip | |
Auto merge of #100497 - kadiwa4:remove_clone_into_iter, r=cjgillot
Avoid cloning a collection only to iterate over it `@rustbot` label: +C-cleanup
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/auto_trait.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/auto_trait.rs b/compiler/rustc_trait_selection/src/traits/auto_trait.rs index 6b230210888..4bab9935501 100644 --- a/compiler/rustc_trait_selection/src/traits/auto_trait.rs +++ b/compiler/rustc_trait_selection/src/traits/auto_trait.rs @@ -341,7 +341,7 @@ impl<'tcx> AutoTraitFinder<'tcx> { } } - let obligations = impl_source.clone().nested_obligations().into_iter(); + let obligations = impl_source.borrow_nested_obligations().iter().cloned(); if !self.evaluate_nested_obligations( ty, |
