diff options
| author | KaDiWa <kalle.wachsmuth@gmail.com> | 2022-08-13 15:50:01 +0200 |
|---|---|---|
| committer | KaDiWa <kalle.wachsmuth@gmail.com> | 2022-08-13 16:16:52 +0200 |
| commit | 4eebcb9910c1180791b0e5dba5b3192d0e0046a4 (patch) | |
| tree | cea770766afe0e4492d81cac7b22f516ad95cd4f /compiler/rustc_trait_selection/src | |
| parent | 75b7e52e92c3b00fc891b47f5b2efdff0a2be55a (diff) | |
| download | rust-4eebcb9910c1180791b0e5dba5b3192d0e0046a4.tar.gz rust-4eebcb9910c1180791b0e5dba5b3192d0e0046a4.zip | |
avoid cloning and then iterating
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, |
