diff options
| author | Josh Stone <jistone@redhat.com> | 2021-03-08 15:32:41 -0800 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2021-03-26 09:32:31 -0700 |
| commit | 72ebebe474aae7203a27fdc1296617edd01321f1 (patch) | |
| tree | e3c47cd4378cc6370ad588318970b2118099fd2a /compiler/rustc_query_system | |
| parent | 3b1f5e34620d6bfa32a127258e2c2d9f2f4d693b (diff) | |
Use iter::zip in compiler/
Diffstat (limited to 'compiler/rustc_query_system')
| -rw-r--r-- | compiler/rustc_query_system/src/lib.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_query_system/src/query/job.rs | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_query_system/src/lib.rs b/compiler/rustc_query_system/src/lib.rs index 26b76a9c006..3db57c0ab3a 100644 --- a/compiler/rustc_query_system/src/lib.rs +++ b/compiler/rustc_query_system/src/lib.rs @@ -3,6 +3,7 @@ #![feature(const_panic)] #![feature(core_intrinsics)] #![feature(hash_raw_entry)] +#![feature(iter_zip)] #![feature(min_specialization)] #![feature(stmt_expr_attributes)] diff --git a/compiler/rustc_query_system/src/query/job.rs b/compiler/rustc_query_system/src/query/job.rs index 35a2ac865f2..21f580db04f 100644 --- a/compiler/rustc_query_system/src/query/job.rs +++ b/compiler/rustc_query_system/src/query/job.rs @@ -22,7 +22,7 @@ use { rustc_data_structures::{jobserver, OnDrop}, rustc_rayon_core as rayon_core, rustc_span::DUMMY_SP, - std::iter::FromIterator, + std::iter::{self, FromIterator}, std::{mem, process}, }; @@ -463,7 +463,7 @@ fn remove_cycle<D: DepKind>( spans.rotate_right(1); // Zip them back together - let mut stack: Vec<_> = spans.into_iter().zip(queries).collect(); + let mut stack: Vec<_> = iter::zip(spans, queries).collect(); // Remove the queries in our cycle from the list of jobs to look at for r in &stack { |
