diff options
| author | Yotam Ofek <yotam.ofek@gmail.com> | 2025-09-27 20:57:50 +0300 |
|---|---|---|
| committer | Yotam Ofek <yotam.ofek@gmail.com> | 2025-09-29 08:08:05 +0300 |
| commit | 68a7c250788833305f73f816b284aafa9e62370a (patch) | |
| tree | fc0eef15595f8d6272d6508ddbfe9c31c3fa5175 /src/librustdoc | |
| parent | f957826bff7a68b267ce75b1ea56352aed0cca0a (diff) | |
| download | rust-68a7c250788833305f73f816b284aafa9e62370a.tar.gz rust-68a7c250788833305f73f816b284aafa9e62370a.zip | |
Use `Iterator::eq` and (dogfood) `eq_by` in compiler and library
Diffstat (limited to 'src/librustdoc')
| -rw-r--r-- | src/librustdoc/clean/types.rs | 2 | ||||
| -rw-r--r-- | src/librustdoc/lib.rs | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs index c2cf39c4be0..4eb32585ffb 100644 --- a/src/librustdoc/clean/types.rs +++ b/src/librustdoc/clean/types.rs @@ -1685,7 +1685,7 @@ impl Type { match (self_cleared, other_cleared) { // Recursive cases. (Type::Tuple(a), Type::Tuple(b)) => { - a.len() == b.len() && a.iter().zip(b).all(|(a, b)| a.is_doc_subtype_of(b, cache)) + a.iter().eq_by(b, |a, b| a.is_doc_subtype_of(b, cache)) } (Type::Slice(a), Type::Slice(b)) => a.is_doc_subtype_of(b, cache), (Type::Array(a, al), Type::Array(b, bl)) => al == bl && a.is_doc_subtype_of(b, cache), diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index c4f24e09ddb..d7ffb25f8bd 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -13,6 +13,7 @@ #![feature(if_let_guard)] #![feature(iter_advance_by)] #![feature(iter_intersperse)] +#![feature(iter_order_by)] #![feature(rustc_private)] #![feature(test)] #![warn(rustc::internal)] |
