Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an unstable 'extra randomization' compile-time flag for hashers #65042

Open
Aaron1011 opened this issue Oct 3, 2019 · 13 comments
Open

Add an unstable 'extra randomization' compile-time flag for hashers #65042

Aaron1011 opened this issue Oct 3, 2019 · 13 comments
Labels
A-reproducibility Area: Reproducible / deterministic builds A-testsuite Area: The testsuite used to check the correctness of rustc C-enhancement Category: An issue proposing an enhancement or a PR with one. C-feature-request Category: A feature request, i.e: not implemented / a PR. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Aaron1011
Copy link
Member

When working on #64906, I ran into a latent dependency on the iteration order of a HashMap. This resulted in the PR becoming unmergeable - since a FxHashMap was being used, the iteration order ended up differing between platforms, which made it impossible to make the tests pass on all platforms.

It would be nice to have a way of exposing these kinds of hidden ordering dependencies before they result in blocked PRs.

I propose the following:

  • Add a new feature called randomize_iteration to std and fxhash. When enabled, this feature will cause the iteration order of iter and iter_mut to be randomized per call.
  • Add a config.toml key to enable both of these features.

This will allow producing a special build of the compiler that will (hopefully) expose many hidden ordering dependencies. The overhead could be very high, but that shouldn't matter too much - the only purpose of this build would be to run the testsuite.

Once std-aware Cargo is fully implement, we could consider making this usable by user-written crates (e.g. allowing people to opt-in to recompiling std in this mode).

@Centril Centril added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-enhancement Category: An issue proposing an enhancement or a PR with one. I-nominated A-testsuite Area: The testsuite used to check the correctness of rustc labels Oct 3, 2019
@Mark-Simulacrum
Copy link
Member

Isn't the correct way to deal with this to ... not use hashmaps? Like, FxHashMap is known to have an unstable iteration order, so we should either a) replace it with something that has a stable iteration order (maybe IndexMap, or I saw on Discord that this might have something to do with 32-bit vs. 64-bit systems hashing differently...).

I think this feature as-is isn't tenable, it's just too problematic in practice. You'll probably never finish a compiler build if it does have high overhead, and I suspect it will.

@the8472
Copy link
Member

the8472 commented Oct 3, 2019

Instead of randomized iteration order you could start at a randomized offset and wrap around, that should be more cache-friendly than fully randomized memory accesses.

@the8472
Copy link
Member

the8472 commented Oct 3, 2019

the iteration order ended up differing between platforms, which made it impossible to make the tests pass on all platforms.

Isn't the actual issue that FxHashMap doesn't use RandomState, i.e. that the iteration order appears to be the same for all instances on a platform? In the hierarchy of per-platform -> per-execution -> per-instance -> per-iteration couldn't the issue also have been avoided if it were randomized per-execution or per-instance?

Per-iteration randomization may lead to unexpected results such as map.iter().eq(map.iter()) == false even though map was not mutably borrowed.

The std::collections documentation is a bit vague on iteration order

For unordered collections like HashMap, the items will be yielded in whatever order the internal representation made most convenient.

This could be interpreted as iteration order being dependent on internal structure, and the structure of a shared reference is not expected to change.

@pnkfelix
Copy link
Member

pnkfelix commented Oct 3, 2019

triage: leaving nominated for discussion, to see if there is any buy-in from any compiler team members. W.r.t. priority... I'll leave this unprioritized for now. (My instinct is that it is P-low, but if that's the case, that's ammunition for just closing it.)

@pnkfelix pnkfelix added the C-feature-request Category: A feature request, i.e: not implemented / a PR. label Oct 3, 2019
@nikomatsakis
Copy link
Contributor

Some thoughts:

  • I could see something like this being useful with flushing out non-deterministic in builds
  • But maybe we could instead have a lint (clippy-style) against iterating over a FxHashMap at all? We could set it to deny in the compiler crates
  • Then we would provide a unordered_iter method where you're expected to comment why the ordering doesn't matter
  • Or else you should use an IndexMap

Then we can basically make a quest issue to resolve all the lint warnings.

@nikomatsakis
Copy link
Contributor

(It seems like a less intrusive and more reliable way of solving the problem.)

@nikomatsakis
Copy link
Contributor

During the meeting I said that a design meeting felt like overkill, but I'm mildly changing my mind here. =) It seems like it could be fruitful to put some thought into the best way to solve this category of bug in general.

@Aaron1011
Copy link
Member Author

Isn't the correct way to deal with this to ... not use hashmaps?

@Mark-Simulacrum The idea here is to detect incorrect dependencies on HashMap iteration order. Unless you're suggesting removing all HashMaps from the compiler, I'm not really sure what you mean,

Isn't the actual issue that FxHashMap doesn't use RandomState, i.e. that the iteration order appears to be the same for all instances on a platform?

@the8472: Yes, I believe that the issue would have been expoesd earlier if FxHashMAp used RandomState.

Per-iteration randomization may lead to unexpected results such as map.iter().eq(map.iter()) == false even though map was not mutably borrowed.

@the8472: That's fine - the point of this is to catch issues, not to be actually be used by a normal rustc build. In my view, any code that actually relies on this is suspect, and it would be good to know about it.

@Mark-Simulacrum
Copy link
Member

@Mark-Simulacrum The idea here is to detect incorrect dependencies on HashMap iteration order. Unless you're suggesting removing all HashMaps from the compiler, I'm not really sure what you mean,

Well, to be more concrete, we have ways of dealing with "iteration order is unstable". For example, Niko mentions that we could fairly easily lint against iterating over hashmaps, and provide a iter_unordered() and friends within the compiler. That to me sounds like a much more likely way to expose these problems in an easy to deal with manner. If we just randomize iteration order, sure, you might change final output, but it is likely quite hard to track down why :)

Aaron1011 added a commit to Aaron1011/rust that referenced this issue Oct 5, 2019
Previously, we were using an `FxHashMap` to collect module re-exports.
However, re-exports end up getting serialized into crate metadata, which
means that metadata generation was non-deterministic. This resulted in
spurious error messages changes (e.g. PR rust-lang#64906) due to pretty-printing
implicitly depending on the order of re-exports when computing the
proper path to show to the user.

See rust-lang#65042 for a long-term strategy to detect this kind of issue
bors added a commit that referenced this issue Oct 6, 2019
…nkov

Make re-export collection deterministic

Fixes #65036

Previously, we were using an `FxHashMap` to collect module re-exports.
However, re-exports end up getting serialized into crate metadata, which
means that metadata generation was non-deterministic. This resulted in
spurious error messages changes (e.g. PR #64906) due to pretty-printing
implicitly depending on the order of re-exports when computing the
proper path to show to the user.

See #65042 for a long-term strategy to detect this kind of issue
@RalfJung
Copy link
Member

RalfJung commented Oct 9, 2019

Isn't the actual issue that FxHashMap doesn't use RandomState, i.e. that the iteration order appears to be the same for all instances on a platform?

It doesn't just appear to be the same, iteration order in FxHashMap is fully deterministic for a fixed platform and a fixed order of insertions and deletions. Non-determinism is not the problem here. Also see #63713 (comment).

The problem rather seems to be that iteration order differs between platforms? That could indeed cause trouble, but is no issue for determinism and also fine for reproducible builds (after all, compilation output will obviously differ between platforms). But indeed if the test suite expects things to be ordered the same way across all platforms, that would be one of the rare cases where such platform-dependent deterministic order could cause problems.

@pnkfelix pnkfelix added the A-reproducibility Area: Reproducible / deterministic builds label Oct 10, 2019
@pnkfelix
Copy link
Member

pnkfelix commented Oct 10, 2019

triage: P-low; removing nomination label. I would want this task to wait until we have a broader discussion about determinism in the compiler (hopefully at a steering meeting).

  • (but AFAIK no one has proposed such a design meeting. Yet!)

@steveklabnik
Copy link
Member

Triage: not aware of any work done here.

@bjorn3
Copy link
Member

bjorn3 commented Feb 21, 2024

I just tried the following and I got a lot of errors and an ICE:

diff --git a/compiler/rustc_data_structures/src/fx.rs b/compiler/rustc_data_structures/src/fx.rs
index 80e72250470..5661159814b 100644
--- a/compiler/rustc_data_structures/src/fx.rs
+++ b/compiler/rustc_data_structures/src/fx.rs
@@ -1,11 +1,12 @@
-use std::hash::BuildHasherDefault;
-
-pub use rustc_hash::{FxHashMap, FxHashSet, FxHasher};
+use std::collections::{HashMap, HashSet};
+use std::hash::RandomState;
 
 pub type StdEntry<'a, K, V> = std::collections::hash_map::Entry<'a, K, V>;
 
-pub type FxIndexMap<K, V> = indexmap::IndexMap<K, V, BuildHasherDefault<FxHasher>>;
-pub type FxIndexSet<V> = indexmap::IndexSet<V, BuildHasherDefault<FxHasher>>;
+pub type FxHashMap<K, V> = HashMap<K, V>;
+pub type FxHashSet<K> = HashSet<K>;
+pub type FxIndexMap<K, V> = indexmap::IndexMap<K, V, RandomState>;
+pub type FxIndexSet<V> = indexmap::IndexSet<V, RandomState>;
 pub type IndexEntry<'a, K, V> = indexmap::map::Entry<'a, K, V>;
 pub type IndexOccupiedEntry<'a, K, V> = indexmap::map::OccupiedEntry<'a, K, V>;
 
diff --git a/compiler/rustc_data_structures/src/sharded.rs b/compiler/rustc_data_structures/src/sharded.rs
index 4b02b183460..c0f0cf36c13 100644
--- a/compiler/rustc_data_structures/src/sharded.rs
+++ b/compiler/rustc_data_structures/src/sharded.rs
@@ -1,4 +1,4 @@
-use crate::fx::{FxHashMap, FxHasher};
+use crate::fx::FxHashMap;
 #[cfg(parallel_compiler)]
 use crate::sync::{is_dyn_thread_safe, CacheAligned};
 use crate::sync::{Lock, LockGuard, Mode};
@@ -224,7 +224,8 @@ pub fn contains_pointer_to<T: Hash + IntoPointer>(&self, value: &T) -> bool {
 
 #[inline]
 pub fn make_hash<K: Hash + ?Sized>(val: &K) -> u64 {
-    let mut state = FxHasher::default();
+    // FIXME somehow randomize this
+    let mut state = rustc_hash::FxHasher::default();
     val.hash(&mut state);
     state.finish()
 }
diff --git a/compiler/rustc_data_structures/src/unord.rs b/compiler/rustc_data_structures/src/unord.rs
index a99e2062039..ab16fcd4743 100644
--- a/compiler/rustc_data_structures/src/unord.rs
+++ b/compiler/rustc_data_structures/src/unord.rs
@@ -2,7 +2,6 @@
 //! ordering. This is a useful property for deterministic computations, such
 //! as required by the query system.
 
-use rustc_hash::{FxHashMap, FxHashSet};
 use std::{
     borrow::{Borrow, BorrowMut},
     collections::hash_map::Entry,
@@ -13,6 +12,7 @@
 
 use crate::{
     fingerprint::Fingerprint,
+    fx::{FxHashMap, FxHashSet},
     stable_hasher::{HashStable, StableCompare, StableHasher, ToStableHashKey},
 };
 
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs
index dea2b9e6ca7..922517ab9c3 100644
--- a/compiler/rustc_parse/src/parser/mod.rs
+++ b/compiler/rustc_parse/src/parser/mod.rs
@@ -179,7 +179,7 @@ pub struct Parser<'a> {
 // This type is used a lot, e.g. it's cloned when matching many declarative macro rules with nonterminals. Make sure
 // it doesn't unintentionally get bigger.
 #[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
-rustc_data_structures::static_assert_size!(Parser<'_>, 264);
+rustc_data_structures::static_assert_size!(Parser<'_>, 280);
 
 /// Stores span information about a closure.
 #[derive(Clone)]
diff --git a/compiler/rustc_pattern_analysis/src/usefulness.rs b/compiler/rustc_pattern_analysis/src/usefulness.rs
index a24da448766..d612b4c32a4 100644
--- a/compiler/rustc_pattern_analysis/src/usefulness.rs
+++ b/compiler/rustc_pattern_analysis/src/usefulness.rs
@@ -709,7 +709,7 @@
 //! I (Nadrieril) prefer to put new tests in `ui/pattern/usefulness` unless there's a specific
 //! reason not to, for example if they crucially depend on a particular feature like `or_patterns`.
 
-use rustc_hash::FxHashSet;
+use rustc_data_structures::fx::FxHashSet;
 use rustc_index::bit_set::BitSet;
 use smallvec::{smallvec, SmallVec};
 use std::fmt;
The errors
error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/ops/try_trait.rs:390:9
    |
390 |         move |a, b| NeverShortCircuit(f(a, b))
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `A` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/ops/try_trait.rs:390:9
    |
390 |         move |a, b| NeverShortCircuit(f(a, b))
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `B` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/ops/try_trait.rs:390:9
    |
390 |         move |a, b| NeverShortCircuit(f(a, b))
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `impl FnMut(A, B) -> T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/ops/try_trait.rs:390:9
    |
390 |         move |a, b| NeverShortCircuit(f(a, b))
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/array/mod.rs:783:9
    |
783 | /         move |_| {
784 | |             // SAFETY: We know that `from_fn` will call this at most N times,
785 | |             // and we checked to ensure that we have at least that many items.
786 | |             unsafe { iter.next_unchecked() }
787 | |         }
    | |_________^

error: type parameter `impl UncheckedIterator<Item = T>` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/array/mod.rs:783:9
    |
783 | /         move |_| {
784 | |             // SAFETY: We know that `from_fn` will call this at most N times,
785 | |             // and we checked to ensure that we have at least that many items.
786 | |             unsafe { iter.next_unchecked() }
787 | |         }
    | |_________^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/cloned.rs:29:5
   |
29 |     move |acc, elt| f(acc, elt.clone())
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/cloned.rs:29:5
   |
29 |     move |acc, elt| f(acc, elt.clone())
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `R` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/cloned.rs:29:5
   |
29 |     move |acc, elt| f(acc, elt.clone())
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `impl FnMut(Acc, T) -> R` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/cloned.rs:29:5
   |
29 |     move |acc, elt| f(acc, elt.clone())
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/copied.rs:32:5
   |
32 |     move |acc, &elt| f(acc, elt)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/copied.rs:32:5
   |
32 |     move |acc, &elt| f(acc, elt)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `impl FnMut(Acc, T) -> Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/copied.rs:32:5
   |
32 |     move |acc, &elt| f(acc, elt)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/copied.rs:36:5
   |
36 |     move |acc, &elt| f(acc, elt)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/copied.rs:36:5
   |
36 |     move |acc, &elt| f(acc, elt)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `R` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/copied.rs:36:5
   |
36 |     move |acc, &elt| f(acc, elt)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `impl FnMut(Acc, T) -> R` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/copied.rs:36:5
   |
36 |     move |acc, &elt| f(acc, elt)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/enumerate.rs:85:13
   |
85 | /             move |acc, item| {
86 | |                 let acc = fold(acc, (*count, item));
87 | |                 *count += 1;
88 | |                 acc
89 | |             }
   | |_____________^

error: type parameter `Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/enumerate.rs:85:13
   |
85 | /             move |acc, item| {
86 | |                 let acc = fold(acc, (*count, item));
87 | |                 *count += 1;
88 | |                 acc
89 | |             }
   | |_____________^

error: type parameter `R` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/enumerate.rs:85:13
   |
85 | /             move |acc, item| {
86 | |                 let acc = fold(acc, (*count, item));
87 | |                 *count += 1;
88 | |                 acc
89 | |             }
   | |_____________^

error: type parameter `impl FnMut(Acc, (usize, T)) -> R + 'a` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/enumerate.rs:85:13
   |
85 | /             move |acc, item| {
86 | |                 let acc = fold(acc, (*count, item));
87 | |                 *count += 1;
88 | |                 acc
89 | |             }
   | |_____________^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/enumerate.rs:106:13
    |
106 | /             move |acc, item| {
107 | |                 let acc = fold(acc, (count, item));
108 | |                 count += 1;
109 | |                 acc
110 | |             }
    | |_____________^

error: type parameter `Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/enumerate.rs:106:13
    |
106 | /             move |acc, item| {
107 | |                 let acc = fold(acc, (count, item));
108 | |                 count += 1;
109 | |                 acc
110 | |             }
    | |_____________^

error: type parameter `impl FnMut(Acc, (usize, T)) -> Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/enumerate.rs:106:13
    |
106 | /             move |acc, item| {
107 | |                 let acc = fold(acc, (count, item));
108 | |                 count += 1;
109 | |                 acc
110 | |             }
    | |_____________^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/enumerate.rs:177:13
    |
177 | /             move |acc, item| {
178 | |                 count -= 1;
179 | |                 fold(acc, (count, item))
180 | |             }
    | |_____________^

error: type parameter `Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/enumerate.rs:177:13
    |
177 | /             move |acc, item| {
178 | |                 count -= 1;
179 | |                 fold(acc, (count, item))
180 | |             }
    | |_____________^

error: type parameter `R` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/enumerate.rs:177:13
    |
177 | /             move |acc, item| {
178 | |                 count -= 1;
179 | |                 fold(acc, (count, item))
180 | |             }
    | |_____________^

error: type parameter `impl FnMut(Acc, (usize, T)) -> R` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/enumerate.rs:177:13
    |
177 | /             move |acc, item| {
178 | |                 count -= 1;
179 | |                 fold(acc, (count, item))
180 | |             }
    | |_____________^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/enumerate.rs:198:13
    |
198 | /             move |acc, item| {
199 | |                 count -= 1;
200 | |                 fold(acc, (count, item))
201 | |             }
    | |_____________^

error: type parameter `Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/enumerate.rs:198:13
    |
198 | /             move |acc, item| {
199 | |                 count -= 1;
200 | |                 fold(acc, (count, item))
201 | |             }
    | |_____________^

error: type parameter `impl FnMut(Acc, (usize, T)) -> Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/enumerate.rs:198:13
    |
198 | /             move |acc, item| {
199 | |                 count -= 1;
200 | |                 fold(acc, (count, item))
201 | |             }
    | |_____________^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/filter.rs:41:5
   |
41 |     move |acc, item| if predicate(&item) { fold(acc, item) } else { acc }
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/filter.rs:41:5
   |
41 |     move |acc, item| if predicate(&item) { fold(acc, item) } else { acc }
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `impl FnMut(&T) -> bool` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/filter.rs:41:5
   |
41 |     move |acc, item| if predicate(&item) { fold(acc, item) } else { acc }
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `impl FnMut(Acc, T) -> Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/filter.rs:41:5
   |
41 |     move |acc, item| if predicate(&item) { fold(acc, item) } else { acc }
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/filter.rs:48:5
   |
48 |     move |acc, item| if predicate(&item) { fold(acc, item) } else { try { acc } }
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/filter.rs:48:5
   |
48 |     move |acc, item| if predicate(&item) { fold(acc, item) } else { try { acc } }
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `R` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/filter.rs:48:5
   |
48 |     move |acc, item| if predicate(&item) { fold(acc, item) } else { try { acc } }
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `impl FnMut(&T) -> bool` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/filter.rs:48:5
   |
48 |     move |acc, item| if predicate(&item) { fold(acc, item) } else { try { acc } }
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `impl FnMut(Acc, T) -> R + 'a` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/filter.rs:48:5
   |
48 |     move |acc, item| if predicate(&item) { fold(acc, item) } else { try { acc } }
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/filter.rs:136:13
    |
136 |             move |x| predicate(&x) as usize
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `impl FnMut(&T) -> bool` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/filter.rs:136:13
    |
136 |             move |x| predicate(&x) as usize
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/filter_map.rs:38:5
   |
38 | /     move |acc, item| match f(item) {
39 | |         Some(x) => fold(acc, x),
40 | |         None => acc,
41 | |     }
   | |_____^

error: type parameter `B` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/filter_map.rs:38:5
   |
38 | /     move |acc, item| match f(item) {
39 | |         Some(x) => fold(acc, x),
40 | |         None => acc,
41 | |     }
   | |_____^

error: type parameter `Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/filter_map.rs:38:5
   |
38 | /     move |acc, item| match f(item) {
39 | |         Some(x) => fold(acc, x),
40 | |         None => acc,
41 | |     }
   | |_____^

error: type parameter `impl FnMut(T) -> Option<B>` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/filter_map.rs:38:5
   |
38 | /     move |acc, item| match f(item) {
39 | |         Some(x) => fold(acc, x),
40 | |         None => acc,
41 | |     }
   | |_____^

error: type parameter `impl FnMut(Acc, B) -> Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/filter_map.rs:38:5
   |
38 | /     move |acc, item| match f(item) {
39 | |         Some(x) => fold(acc, x),
40 | |         None => acc,
41 | |     }
   | |_____^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/filter_map.rs:48:5
   |
48 | /     move |acc, item| match f(item) {
49 | |         Some(x) => fold(acc, x),
50 | |         None => try { acc },
51 | |     }
   | |_____^

error: type parameter `B` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/filter_map.rs:48:5
   |
48 | /     move |acc, item| match f(item) {
49 | |         Some(x) => fold(acc, x),
50 | |         None => try { acc },
51 | |     }
   | |_____^

error: type parameter `Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/filter_map.rs:48:5
   |
48 | /     move |acc, item| match f(item) {
49 | |         Some(x) => fold(acc, x),
50 | |         None => try { acc },
51 | |     }
   | |_____^

error: type parameter `R` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/filter_map.rs:48:5
   |
48 | /     move |acc, item| match f(item) {
49 | |         Some(x) => fold(acc, x),
50 | |         None => try { acc },
51 | |     }
   | |_____^

error: type parameter `impl FnMut(T) -> Option<B>` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/filter_map.rs:48:5
   |
48 | /     move |acc, item| match f(item) {
49 | |         Some(x) => fold(acc, x),
50 | |         None => try { acc },
51 | |     }
   | |_____^

error: type parameter `impl FnMut(Acc, B) -> R + 'a` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/filter_map.rs:48:5
   |
48 | /     move |acc, item| match f(item) {
49 | |         Some(x) => fold(acc, x),
50 | |         None => try { acc },
51 | |     }
   | |_____^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/filter_map.rs:163:13
    |
163 | /             move |(), x| match f(x) {
164 | |                 Some(x) => ControlFlow::Break(x),
165 | |                 None => ControlFlow::Continue(()),
166 | |             }
    | |_____________^

error: type parameter `B` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/filter_map.rs:163:13
    |
163 | /             move |(), x| match f(x) {
164 | |                 Some(x) => ControlFlow::Break(x),
165 | |                 None => ControlFlow::Continue(()),
166 | |             }
    | |_____________^

error: type parameter `impl FnMut(T) -> Option<B>` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/filter_map.rs:163:13
    |
163 | /             move |(), x| match f(x) {
164 | |                 Some(x) => ControlFlow::Break(x),
165 | |                 None => ControlFlow::Continue(()),
166 | |             }
    | |_____________^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:475:13
    |
475 |             move |acc, iter| fold(acc, iter.into_iter())
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:475:13
    |
475 |             move |acc, iter| fold(acc, iter.into_iter())
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `impl FnMut(Acc, T::IntoIter) -> Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:475:13
    |
475 |             move |acc, iter| fold(acc, iter.into_iter())
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:507:13
    |
507 |             move |acc, iter| fold(acc, frontiter.insert(iter.into_iter()))
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:507:13
    |
507 |             move |acc, iter| fold(acc, frontiter.insert(iter.into_iter()))
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `R` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:507:13
    |
507 |             move |acc, iter| fold(acc, frontiter.insert(iter.into_iter()))
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `impl FnMut(Acc, &mut T::IntoIter) -> R` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:507:13
    |
507 |             move |acc, iter| fold(acc, frontiter.insert(iter.into_iter()))
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:544:13
    |
544 |             move |acc, iter| fold(acc, iter.into_iter())
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:544:13
    |
544 |             move |acc, iter| fold(acc, iter.into_iter())
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `impl FnMut(Acc, T::IntoIter) -> Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:544:13
    |
544 |             move |acc, iter| fold(acc, iter.into_iter())
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:576:13
    |
576 |             move |acc, iter| fold(acc, backiter.insert(iter.into_iter()))
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:576:13
    |
576 |             move |acc, iter| fold(acc, backiter.insert(iter.into_iter()))
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `R` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:576:13
    |
576 |             move |acc, iter| fold(acc, backiter.insert(iter.into_iter()))
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `impl FnMut(Acc, &mut T::IntoIter) -> R` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:576:13
    |
576 |             move |acc, iter| fold(acc, backiter.insert(iter.into_iter()))
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `U` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:650:13
    |
650 |             move |acc, iter| iter.try_fold(acc, &mut fold)
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:650:13
    |
650 |             move |acc, iter| iter.try_fold(acc, &mut fold)
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `R` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:650:13
    |
650 |             move |acc, iter| iter.try_fold(acc, &mut fold)
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `impl FnMut(Acc, U::Item) -> R` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:650:13
    |
650 |             move |acc, iter| iter.try_fold(acc, &mut fold)
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `U` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:665:13
    |
665 |             move |acc, iter| iter.fold(acc, &mut fold)
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:665:13
    |
665 |             move |acc, iter| iter.fold(acc, &mut fold)
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `impl FnMut(Acc, U::Item) -> Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:665:13
    |
665 |             move |acc, iter| iter.fold(acc, &mut fold)
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0284]: type annotations needed
   --> library/core/src/iter/traits/double_ended.rs:229:5
    |
229 | /     fn try_rfold<B, F, R>(&mut self, init: B, mut f: F) -> R
230 | |     where
231 | |         Self: Sized,
232 | |         F: FnMut(B, Self::Item) -> R,
233 | |         R: Try<Output = B>,
    | |___________________________^ cannot infer type
    |
    = note: cannot satisfy `<Self as Iterator>::Item == _`

error[E0284]: type annotations needed
   --> library/core/src/iter/traits/double_ended.rs:300:5
    |
300 | /     fn rfold<B, F>(mut self, init: B, mut f: F) -> B
301 | |     where
302 | |         Self: Sized,
303 | |         F: FnMut(B, Self::Item) -> B,
    | |_____________________________________^ cannot infer type
    |
    = note: cannot satisfy `<Self as Iterator>::Item == _`

error: type parameter `I` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:893:5
    |
893 | /     move |acc, inner| match inner.into_iter().next() {
894 | |         Some(item) => fold(acc, item),
895 | |         None => acc,
896 | |     }
    | |_____^

error: type parameter `Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:893:5
    |
893 | /     move |acc, inner| match inner.into_iter().next() {
894 | |         Some(item) => fold(acc, item),
895 | |         None => acc,
896 | |     }
    | |_____^

error: type parameter `impl FnMut(Acc, I::Item) -> Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:893:5
    |
893 | /     move |acc, inner| match inner.into_iter().next() {
894 | |         Some(item) => fold(acc, item),
895 | |         None => acc,
896 | |     }
    | |_____^

error: type parameter `I` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:903:5
    |
903 | /     move |acc, inner| match inner.into_iter().next() {
904 | |         Some(item) => fold(acc, item),
905 | |         None => try { acc },
906 | |     }
    | |_____^

error: type parameter `Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:903:5
    |
903 | /     move |acc, inner| match inner.into_iter().next() {
904 | |         Some(item) => fold(acc, item),
905 | |         None => try { acc },
906 | |     }
    | |_____^

error: type parameter `R` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:903:5
    |
903 | /     move |acc, inner| match inner.into_iter().next() {
904 | |         Some(item) => fold(acc, item),
905 | |         None => try { acc },
906 | |     }
    | |_____^

error: type parameter `impl FnMut(Acc, I::Item) -> R` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/flatten.rs:903:5
    |
903 | /     move |acc, inner| match inner.into_iter().next() {
904 | |         Some(item) => fold(acc, item),
905 | |         None => try { acc },
906 | |     }
    | |_____^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/inspect.rs:52:5
   |
52 | /     move |acc, item| {
53 | |         f(&item);
54 | |         fold(acc, item)
55 | |     }
   | |_____^

error: type parameter `Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/inspect.rs:52:5
   |
52 | /     move |acc, item| {
53 | |         f(&item);
54 | |         fold(acc, item)
55 | |     }
   | |_____^

error: type parameter `impl FnMut(&T)` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/inspect.rs:52:5
   |
52 | /     move |acc, item| {
53 | |         f(&item);
54 | |         fold(acc, item)
55 | |     }
   | |_____^

error: type parameter `impl FnMut(Acc, T) -> Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/inspect.rs:52:5
   |
52 | /     move |acc, item| {
53 | |         f(&item);
54 | |         fold(acc, item)
55 | |     }
   | |_____^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/inspect.rs:62:5
   |
62 | /     move |acc, item| {
63 | |         f(&item);
64 | |         fold(acc, item)
65 | |     }
   | |_____^

error: type parameter `Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/inspect.rs:62:5
   |
62 | /     move |acc, item| {
63 | |         f(&item);
64 | |         fold(acc, item)
65 | |     }
   | |_____^

error: type parameter `R` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/inspect.rs:62:5
   |
62 | /     move |acc, item| {
63 | |         f(&item);
64 | |         fold(acc, item)
65 | |     }
   | |_____^

error: type parameter `impl FnMut(&T)` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/inspect.rs:62:5
   |
62 | /     move |acc, item| {
63 | |         f(&item);
64 | |         fold(acc, item)
65 | |     }
   | |_____^

error: type parameter `impl FnMut(Acc, T) -> R + 'a` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/inspect.rs:62:5
   |
62 | /     move |acc, item| {
63 | |         f(&item);
64 | |         fold(acc, item)
65 | |     }
   | |_____^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/map.rs:89:5
   |
89 |     move |acc, elt| g(acc, f(elt))
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `B` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/map.rs:89:5
   |
89 |     move |acc, elt| g(acc, f(elt))
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/map.rs:89:5
   |
89 |     move |acc, elt| g(acc, f(elt))
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `impl FnMut(T) -> B` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/map.rs:89:5
   |
89 |     move |acc, elt| g(acc, f(elt))
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `impl FnMut(Acc, B) -> Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/map.rs:89:5
   |
89 |     move |acc, elt| g(acc, f(elt))
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/map.rs:96:5
   |
96 |     move |acc, elt| g(acc, f(elt))
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `B` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/map.rs:96:5
   |
96 |     move |acc, elt| g(acc, f(elt))
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/map.rs:96:5
   |
96 |     move |acc, elt| g(acc, f(elt))
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `R` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/map.rs:96:5
   |
96 |     move |acc, elt| g(acc, f(elt))
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `impl FnMut(T) -> B` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/map.rs:96:5
   |
96 |     move |acc, elt| g(acc, f(elt))
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `impl FnMut(Acc, B) -> R + 'a` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/map.rs:96:5
   |
96 |     move |acc, elt| g(acc, f(elt))
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/scan.rs:67:13
   |
67 | /             move |acc, x| match f(state, x) {
68 | |                 None => ControlFlow::Break(try { acc }),
69 | |                 Some(x) => ControlFlow::from_try(fold(acc, x)),
70 | |             }
   | |_____________^

error: type parameter `St` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/scan.rs:67:13
   |
67 | /             move |acc, x| match f(state, x) {
68 | |                 None => ControlFlow::Break(try { acc }),
69 | |                 Some(x) => ControlFlow::from_try(fold(acc, x)),
70 | |             }
   | |_____________^

error: type parameter `B` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/scan.rs:67:13
   |
67 | /             move |acc, x| match f(state, x) {
68 | |                 None => ControlFlow::Break(try { acc }),
69 | |                 Some(x) => ControlFlow::from_try(fold(acc, x)),
70 | |             }
   | |_____________^

error: type parameter `Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/scan.rs:67:13
   |
67 | /             move |acc, x| match f(state, x) {
68 | |                 None => ControlFlow::Break(try { acc }),
69 | |                 Some(x) => ControlFlow::from_try(fold(acc, x)),
70 | |             }
   | |_____________^

error: type parameter `R` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/scan.rs:67:13
   |
67 | /             move |acc, x| match f(state, x) {
68 | |                 None => ControlFlow::Break(try { acc }),
69 | |                 Some(x) => ControlFlow::from_try(fold(acc, x)),
70 | |             }
   | |_____________^

error: type parameter `impl FnMut(&mut St, T) -> Option<B>` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/scan.rs:67:13
   |
67 | /             move |acc, x| match f(state, x) {
68 | |                 None => ControlFlow::Break(try { acc }),
69 | |                 Some(x) => ControlFlow::from_try(fold(acc, x)),
70 | |             }
   | |_____________^

error: type parameter `impl FnMut(Acc, B) -> R + 'a` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/scan.rs:67:13
   |
67 | /             move |acc, x| match f(state, x) {
68 | |                 None => ControlFlow::Break(try { acc }),
69 | |                 Some(x) => ControlFlow::from_try(fold(acc, x)),
70 | |             }
   | |_____________^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/skip.rs:223:13
    |
223 | /             move |acc, x| {
224 | |                 n -= 1;
225 | |                 let r = fold(acc, x);
226 | |                 if n == 0 { ControlFlow::Break(r) } else { ControlFlow::from_try(r) }
227 | |             }
    | |_____________^

error: type parameter `Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/skip.rs:223:13
    |
223 | /             move |acc, x| {
224 | |                 n -= 1;
225 | |                 let r = fold(acc, x);
226 | |                 if n == 0 { ControlFlow::Break(r) } else { ControlFlow::from_try(r) }
227 | |             }
    | |_____________^

error: type parameter `R` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/skip.rs:223:13
    |
223 | /             move |acc, x| {
224 | |                 n -= 1;
225 | |                 let r = fold(acc, x);
226 | |                 if n == 0 { ControlFlow::Break(r) } else { ControlFlow::from_try(r) }
227 | |             }
    | |_____________^

error: type parameter `impl FnMut(Acc, T) -> R` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/skip.rs:223:13
    |
223 | /             move |acc, x| {
224 | |                 n -= 1;
225 | |                 let r = fold(acc, x);
226 | |                 if n == 0 { ControlFlow::Break(r) } else { ControlFlow::from_try(r) }
227 | |             }
    | |_____________^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/skip_while.rs:48:13
   |
48 | /             move |x| {
49 | |                 if *flag || !pred(x) {
50 | |                     *flag = true;
51 | |                     true
...  |
54 | |                 }
55 | |             }
   | |_____________^

error: type parameter `impl FnMut(&T) -> bool` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/skip_while.rs:48:13
   |
48 | /             move |x| {
49 | |                 if *flag || !pred(x) {
50 | |                     *flag = true;
51 | |                     true
...  |
54 | |                 }
55 | |             }
   | |_____________^

error: type parameter `I` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/step_by.rs:293:13
    |
293 |             move || iter.nth(step)
    |             ^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `I` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/step_by.rs:312:13
    |
312 |             move || iter.nth(step)
    |             ^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `I` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/step_by.rs:354:13
    |
354 |             move || iter.nth_back(step)
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `I` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/step_by.rs:377:13
    |
377 |             move || iter.nth_back(step)
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/take.rs:89:13
   |
89 | /             move |acc, x| {
90 | |                 *n -= 1;
91 | |                 let r = fold(acc, x);
92 | |                 if *n == 0 { ControlFlow::Break(r) } else { ControlFlow::from_try(r) }
93 | |             }
   | |_____________^

error: type parameter `Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/take.rs:89:13
   |
89 | /             move |acc, x| {
90 | |                 *n -= 1;
91 | |                 let r = fold(acc, x);
92 | |                 if *n == 0 { ControlFlow::Break(r) } else { ControlFlow::from_try(r) }
93 | |             }
   | |_____________^

error: type parameter `R` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/take.rs:89:13
   |
89 | /             move |acc, x| {
90 | |                 *n -= 1;
91 | |                 let r = fold(acc, x);
92 | |                 if *n == 0 { ControlFlow::Break(r) } else { ControlFlow::from_try(r) }
93 | |             }
   | |_____________^

error: type parameter `impl FnMut(Acc, T) -> R + 'a` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/take.rs:89:13
   |
89 | /             move |acc, x| {
90 | |                 *n -= 1;
91 | |                 let r = fold(acc, x);
92 | |                 if *n == 0 { ControlFlow::Break(r) } else { ControlFlow::from_try(r) }
93 | |             }
   | |_____________^

error: type parameter `Item` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/take.rs:282:13
    |
282 | /             move |more, x| {
283 | |                 action(x);
284 | |                 more.checked_sub(1)
285 | |             }
    | |_____________^

error: type parameter `impl FnMut(Item) + 'a` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/adapters/take.rs:282:13
    |
282 | /             move |more, x| {
283 | |                 action(x);
284 | |                 more.checked_sub(1)
285 | |             }
    | |_____________^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/take_while.rs:79:13
   |
79 | /             move |acc, x| {
80 | |                 if p(&x) {
81 | |                     ControlFlow::from_try(fold(acc, x))
82 | |                 } else {
...  |
85 | |                 }
86 | |             }
   | |_____________^

error: type parameter `Acc` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/take_while.rs:79:13
   |
79 | /             move |acc, x| {
80 | |                 if p(&x) {
81 | |                     ControlFlow::from_try(fold(acc, x))
82 | |                 } else {
...  |
85 | |                 }
86 | |             }
   | |_____________^

error: type parameter `R` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/take_while.rs:79:13
   |
79 | /             move |acc, x| {
80 | |                 if p(&x) {
81 | |                     ControlFlow::from_try(fold(acc, x))
82 | |                 } else {
...  |
85 | |                 }
86 | |             }
   | |_____________^

error: type parameter `impl FnMut(&T) -> bool` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/take_while.rs:79:13
   |
79 | /             move |acc, x| {
80 | |                 if p(&x) {
81 | |                     ControlFlow::from_try(fold(acc, x))
82 | |                 } else {
...  |
85 | |                 }
86 | |             }
   | |_____________^

error: type parameter `impl FnMut(Acc, T) -> R + 'a` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> library/core/src/iter/adapters/take_while.rs:79:13
   |
79 | /             move |acc, x| {
80 | |                 if p(&x) {
81 | |                     ControlFlow::from_try(fold(acc, x))
82 | |                 } else {
...  |
85 | |                 }
86 | |             }
   | |_____________^

error: type parameter `A` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/traits/collect.rs:431:13
    |
431 | /             move |(), (t, u)| {
432 | |                 a.extend_one(t);
433 | |                 b.extend_one(u);
434 | |             }
    | |_____________^

error: type parameter `B` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/traits/collect.rs:431:13
    |
431 | /             move |(), (t, u)| {
432 | |                 a.extend_one(t);
433 | |                 b.extend_one(u);
434 | |             }
    | |_____________^

error: type parameter `impl Extend<A>` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/traits/collect.rs:431:13
    |
431 | /             move |(), (t, u)| {
432 | |                 a.extend_one(t);
433 | |                 b.extend_one(u);
434 | |             }
    | |_____________^

error: type parameter `impl Extend<B>` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/traits/collect.rs:431:13
    |
431 | /             move |(), (t, u)| {
432 | |                 a.extend_one(t);
433 | |                 b.extend_one(u);
434 | |             }
    | |_____________^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/traits/double_ended.rs:362:13
    |
362 | /             move |(), x| {
363 | |                 if predicate(&x) { ControlFlow::Break(x) } else { ControlFlow::Continue(()) }
364 | |             }
    | |_____________^

error: type parameter `impl FnMut(&T) -> bool` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/traits/double_ended.rs:362:13
    |
362 | /             move |(), x| {
363 | |                 if predicate(&x) { ControlFlow::Break(x) } else { ControlFlow::Continue(()) }
364 | |             }
    | |_____________^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/traits/iterator.rs:845:13
    |
845 |             move |(), item| f(item)
    |             ^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `impl FnMut(T)` is part of concrete type but not used in parameter list for the `impl Trait` type alias
   --> library/core/src/iter/traits/iterator.rs:845:13
    |
845 |             move |(), item| f(item)
    |             ^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:2228:13
     |
2228 | /             move |(), x| {
2229 | |                 if f(&x) {
2230 | |                     left.extend_one(x);
2231 | |                 } else {
2232 | |                     right.extend_one(x);
2233 | |                 }
2234 | |             }
     | |_____________^

error: type parameter `B` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:2228:13
     |
2228 | /             move |(), x| {
2229 | |                 if f(&x) {
2230 | |                     left.extend_one(x);
2231 | |                 } else {
2232 | |                     right.extend_one(x);
2233 | |                 }
2234 | |             }
     | |_____________^

error: type parameter `impl FnMut(&T) -> bool + 'a` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:2228:13
     |
2228 | /             move |(), x| {
2229 | |                 if f(&x) {
2230 | |                     left.extend_one(x);
2231 | |                 } else {
2232 | |                     right.extend_one(x);
2233 | |                 }
2234 | |             }
     | |_____________^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:2294:13
     |
2294 | /             move |x| {
2295 | |                 let p = predicate(&**x);
2296 | |                 *true_count += p as usize;
2297 | |                 !p
2298 | |             }
     | |_____________^

error: type parameter `impl FnMut(&T) -> bool` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:2294:13
     |
2294 | /             move |x| {
2295 | |                 let p = predicate(&**x);
2296 | |                 *true_count += p as usize;
2297 | |                 !p
2298 | |             }
     | |_____________^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:2303:13
     |
2303 |             move |x| predicate(&**x)
     |             ^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `impl FnMut(&T) -> bool` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:2303:13
     |
2303 |             move |x| predicate(&**x)
     |             ^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:2499:13
     |
2499 |             move |(), x| f(x)
     |             ^^^^^^^^^^^^^^^^^

error: type parameter `R` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:2499:13
     |
2499 |             move |(), x| f(x)
     |             ^^^^^^^^^^^^^^^^^

error: type parameter `impl FnMut(T) -> R` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:2499:13
     |
2499 |             move |(), x| f(x)
     |             ^^^^^^^^^^^^^^^^^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:2786:13
     |
2786 | /             move |(), x| {
2787 | |                 if f(x) { ControlFlow::Continue(()) } else { ControlFlow::Break(()) }
2788 | |             }
     | |_____________^

error: type parameter `impl FnMut(T) -> bool` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:2786:13
     |
2786 | /             move |(), x| {
2787 | |                 if f(x) { ControlFlow::Continue(()) } else { ControlFlow::Break(()) }
2788 | |             }
     | |_____________^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:2840:13
     |
2840 | /             move |(), x| {
2841 | |                 if f(x) { ControlFlow::Break(()) } else { ControlFlow::Continue(()) }
2842 | |             }
     | |_____________^

error: type parameter `impl FnMut(T) -> bool` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:2840:13
     |
2840 | /             move |(), x| {
2841 | |                 if f(x) { ControlFlow::Break(()) } else { ControlFlow::Continue(()) }
2842 | |             }
     | |_____________^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:2904:13
     |
2904 | /             move |(), x| {
2905 | |                 if predicate(&x) { ControlFlow::Break(x) } else { ControlFlow::Continue(()) }
2906 | |             }
     | |_____________^

error: type parameter `impl FnMut(&T) -> bool` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:2904:13
     |
2904 | /             move |(), x| {
2905 | |                 if predicate(&x) { ControlFlow::Break(x) } else { ControlFlow::Continue(()) }
2906 | |             }
     | |_____________^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:2936:13
     |
2936 | /             move |(), x| match f(x) {
2937 | |                 Some(x) => ControlFlow::Break(x),
2938 | |                 None => ControlFlow::Continue(()),
2939 | |             }
     | |_____________^

error: type parameter `B` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:2936:13
     |
2936 | /             move |(), x| match f(x) {
2937 | |                 Some(x) => ControlFlow::Break(x),
2938 | |                 None => ControlFlow::Continue(()),
2939 | |             }
     | |_____________^

error: type parameter `impl FnMut(T) -> Option<B>` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:2936:13
     |
2936 | /             move |(), x| match f(x) {
2937 | |                 Some(x) => ControlFlow::Break(x),
2938 | |                 None => ControlFlow::Continue(()),
2939 | |             }
     | |_____________^

error: type parameter `I` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:3001:13
     |
3001 | /             move |(), x| match f(&x).branch() {
3002 | |                 ControlFlow::Continue(false) => ControlFlow::Continue(()),
3003 | |                 ControlFlow::Continue(true) => ControlFlow::Break(Try::from_output(Some(x))),
3004 | |                 ControlFlow::Break(r) => ControlFlow::Break(FromResidual::from_residual(r)),
3005 | |             }
     | |_____________^

error: type parameter `V` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:3001:13
     |
3001 | /             move |(), x| match f(&x).branch() {
3002 | |                 ControlFlow::Continue(false) => ControlFlow::Continue(()),
3003 | |                 ControlFlow::Continue(true) => ControlFlow::Break(Try::from_output(Some(x))),
3004 | |                 ControlFlow::Break(r) => ControlFlow::Break(FromResidual::from_residual(r)),
3005 | |             }
     | |_____________^

error: type parameter `R` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:3001:13
     |
3001 | /             move |(), x| match f(&x).branch() {
3002 | |                 ControlFlow::Continue(false) => ControlFlow::Continue(()),
3003 | |                 ControlFlow::Continue(true) => ControlFlow::Break(Try::from_output(Some(x))),
3004 | |                 ControlFlow::Break(r) => ControlFlow::Break(FromResidual::from_residual(r)),
3005 | |             }
     | |_____________^

error: type parameter `impl FnMut(&I) -> V` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:3001:13
     |
3001 | /             move |(), x| match f(&x).branch() {
3002 | |                 ControlFlow::Continue(false) => ControlFlow::Continue(()),
3003 | |                 ControlFlow::Continue(true) => ControlFlow::Break(Try::from_output(Some(x))),
3004 | |                 ControlFlow::Break(r) => ControlFlow::Break(FromResidual::from_residual(r)),
3005 | |             }
     | |_____________^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:3080:13
     |
3080 | /             move |_, x| {
3081 | |                 if predicate(x) {
3082 | |                     ControlFlow::Break(*acc)
3083 | |                 } else {
...    |
3086 | |                 }
3087 | |             }
     | |_____________^

error: type parameter `impl FnMut(T) -> bool + 'a` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:3080:13
     |
3080 | /             move |_, x| {
3081 | |                 if predicate(x) {
3082 | |                     ControlFlow::Break(*acc)
3083 | |                 } else {
...    |
3086 | |                 }
3087 | |             }
     | |_____________^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:3145:13
     |
3145 | /             move |i, x| {
3146 | |                 let i = i - 1;
3147 | |                 if predicate(x) { ControlFlow::Break(i) } else { ControlFlow::Continue(i) }
3148 | |             }
     | |_____________^

error: type parameter `impl FnMut(T) -> bool` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:3145:13
     |
3145 | /             move |i, x| {
3146 | |                 let i = i - 1;
3147 | |                 if predicate(x) { ControlFlow::Break(i) } else { ControlFlow::Continue(i) }
3148 | |             }
     | |_____________^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:3251:13
     |
3251 |             move |x| (f(&x), x)
     |             ^^^^^^^^^^^^^^^^^^^

error: type parameter `B` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:3251:13
     |
3251 |             move |x| (f(&x), x)
     |             ^^^^^^^^^^^^^^^^^^^

error: type parameter `impl FnMut(&T) -> B` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:3251:13
     |
3251 |             move |x| (f(&x), x)
     |             ^^^^^^^^^^^^^^^^^^^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:3285:13
     |
3285 |             move |x, y| cmp::max_by(x, y, &mut compare)
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `impl FnMut(&T, &T) -> Ordering` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:3285:13
     |
3285 |             move |x, y| cmp::max_by(x, y, &mut compare)
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:3313:13
     |
3313 |             move |x| (f(&x), x)
     |             ^^^^^^^^^^^^^^^^^^^

error: type parameter `B` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:3313:13
     |
3313 |             move |x| (f(&x), x)
     |             ^^^^^^^^^^^^^^^^^^^

error: type parameter `impl FnMut(&T) -> B` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:3313:13
     |
3313 |             move |x| (f(&x), x)
     |             ^^^^^^^^^^^^^^^^^^^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:3347:13
     |
3347 |             move |x, y| cmp::min_by(x, y, &mut compare)
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `impl FnMut(&T, &T) -> Ordering` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:3347:13
     |
3347 |             move |x, y| cmp::min_by(x, y, &mut compare)
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type parameter `X` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:3697:13
     |
3697 | /             move |x, y| match cmp(x, y) {
3698 | |                 Ordering::Equal => ControlFlow::Continue(()),
3699 | |                 non_eq => ControlFlow::Break(non_eq),
3700 | |             }
     | |_____________^

error: type parameter `Y` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:3697:13
     |
3697 | /             move |x, y| match cmp(x, y) {
3698 | |                 Ordering::Equal => ControlFlow::Continue(()),
3699 | |                 non_eq => ControlFlow::Break(non_eq),
3700 | |             }
     | |_____________^

error: type parameter `F` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:3697:13
     |
3697 | /             move |x, y| match cmp(x, y) {
3698 | |                 Ordering::Equal => ControlFlow::Continue(()),
3699 | |                 non_eq => ControlFlow::Break(non_eq),
3700 | |             }
     | |_____________^

error: type parameter `X` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:3791:13
     |
3791 | /             move |x, y| match partial_cmp(x, y) {
3792 | |                 Some(Ordering::Equal) => ControlFlow::Continue(()),
3793 | |                 non_eq => ControlFlow::Break(non_eq),
3794 | |             }
     | |_____________^

error: type parameter `Y` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:3791:13
     |
3791 | /             move |x, y| match partial_cmp(x, y) {
3792 | |                 Some(Ordering::Equal) => ControlFlow::Continue(()),
3793 | |                 non_eq => ControlFlow::Break(non_eq),
3794 | |             }
     | |_____________^

error: type parameter `F` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:3791:13
     |
3791 | /             move |x, y| match partial_cmp(x, y) {
3792 | |                 Some(Ordering::Equal) => ControlFlow::Continue(()),
3793 | |                 non_eq => ControlFlow::Break(non_eq),
3794 | |             }
     | |_____________^

error: type parameter `X` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:3849:13
     |
3849 | /             move |x, y| {
3850 | |                 if eq(x, y) { ControlFlow::Continue(()) } else { ControlFlow::Break(()) }
3851 | |             }
     | |_____________^

error: type parameter `Y` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:3849:13
     |
3849 | /             move |x, y| {
3850 | |                 if eq(x, y) { ControlFlow::Continue(()) } else { ControlFlow::Break(()) }
3851 | |             }
     | |_____________^

error: type parameter `F` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:3849:13
     |
3849 | /             move |x, y| {
3850 | |                 if eq(x, y) { ControlFlow::Continue(()) } else { ControlFlow::Break(()) }
3851 | |             }
     | |_____________^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:4030:13
     |
4030 | /             move |curr| {
4031 | |                 if !compare(&last, &curr) {
4032 | |                     return false;
4033 | |                 }
4034 | |                 *last = curr;
4035 | |                 true
4036 | |             }
     | |_____________^

error: type parameter `impl FnMut(&T, &T) -> bool + 'a` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:4030:13
     |
4030 | /             move |curr| {
4031 | |                 if !compare(&last, &curr) {
4032 | |                     return false;
4033 | |                 }
4034 | |                 *last = curr;
4035 | |                 true
4036 | |             }
     | |_____________^

error: type parameter `B` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:4116:9
     |
4116 | /         move |x| match b.next() {
4117 | |             None => ControlFlow::Break(ControlFlow::Continue(Ordering::Greater)),
4118 | |             Some(y) => f(x, y).map_break(ControlFlow::Break),
4119 | |         }
     | |_________^

error: type parameter `X` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:4116:9
     |
4116 | /         move |x| match b.next() {
4117 | |             None => ControlFlow::Break(ControlFlow::Continue(Ordering::Greater)),
4118 | |             Some(y) => f(x, y).map_break(ControlFlow::Break),
4119 | |         }
     | |_________^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:4116:9
     |
4116 | /         move |x| match b.next() {
4117 | |             None => ControlFlow::Break(ControlFlow::Continue(Ordering::Greater)),
4118 | |             Some(y) => f(x, y).map_break(ControlFlow::Break),
4119 | |         }
     | |_________^

error: type parameter `impl FnMut(X, B::Item) -> ControlFlow<T> + 'a` is part of concrete type but not used in parameter list for the `impl Trait` type alias
    --> library/core/src/iter/traits/iterator.rs:4116:9
     |
4116 | /         move |x| match b.next() {
4117 | |             None => ControlFlow::Break(ControlFlow::Continue(Ordering::Greater)),
4118 | |             Some(y) => f(x, y).map_break(ControlFlow::Break),
4119 | |         }
     | |_________^

error[E0119]: conflicting implementations of trait `SpecArrayClone`
   --> library/core/src/array/mod.rs:423:1
    |
416 | impl<T: Clone> SpecArrayClone for T {
    | ----------------------------------- first implementation here
...
423 | impl<T: Copy> SpecArrayClone for T {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation

error[E0119]: conflicting implementations of trait `SpecArrayEq<_, _>`
   --> library/core/src/array/equality.rs:146:1
    |
137 | impl<T: PartialEq<Other>, Other, const N: usize> SpecArrayEq<Other, N> for T {
    | ---------------------------------------------------------------------------- first implementation here
...
146 | impl<T: BytewiseEq<U>, U, const N: usize> SpecArrayEq<U, N> for T {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation

error[E0119]: conflicting implementations of trait `array_chunks::SpecFold` for type `array_chunks::ArrayChunks<_, _>`
   --> library/core/src/iter/adapters/array_chunks.rs:206:1
    |
192 | / impl<I, const N: usize> SpecFold for ArrayChunks<I, N>
193 | | where
194 | |     I: Iterator,
    | |________________- first implementation here
...
206 | / impl<I, const N: usize> SpecFold for ArrayChunks<I, N>
207 | | where
208 | |     I: Iterator + TrustedRandomAccessNoCoerce,
    | |______________________________________________^ conflicting implementation for `array_chunks::ArrayChunks<_, _>`

error: cannot specialize on trait `Iterator`
   --> library/core/src/iter/adapters/array_chunks.rs:243:21
    |
243 |     I: SourceIter + Iterator,
    |                     ^^^^^^^^

error[E0119]: conflicting implementations of trait `SpecNextChunk<'_, _, _>` for type `slice::iter::Iter<'_, _>`
   --> library/core/src/iter/adapters/copied.rs:200:1
    |
190 | / impl<'a, const N: usize, I, T: 'a> SpecNextChunk<'a, N, T> for I
191 | | where
192 | |     I: Iterator<Item = &'a T>,
193 | |     T: Copy,
    | |____________- first implementation here
...
200 | / impl<'a, const N: usize, T: 'a> SpecNextChunk<'a, N, T> for crate::slice::Iter<'a, T>
201 | | where
202 | |     T: Copy,
    | |____________^ conflicting implementation for `slice::iter::Iter<'_, _>`

error: cannot specialize on trait `IntoIterator`
   --> library/core/src/iter/adapters/flatten.rs:166:22
    |
166 |     U: BoundedSize + IntoIterator,
    |                      ^^^^^^^^^^^^

error: cannot specialize on trait `IntoIterator`
   --> library/core/src/iter/adapters/flatten.rs:181:8
    |
181 |     U: IntoIterator,
    |        ^^^^^^^^^^^^

error: cannot specialize on trait `IntoIterator`
   --> library/core/src/iter/adapters/flatten.rs:395:28
    |
395 |     <I as Iterator>::Item: IntoIterator + BoundedSize,
    |                            ^^^^^^^^^^^^

error: cannot specialize on trait `Iterator`
   --> library/core/src/iter/adapters/flatten.rs:394:26
    |
394 |     I: InPlaceIterable + Iterator,
    |                          ^^^^^^^^

error: cannot specialize on trait `IntoIterator`
   --> library/core/src/iter/adapters/flatten.rs:410:28
    |
410 |     <I as Iterator>::Item: IntoIterator,
    |                            ^^^^^^^^^^^^

error: cannot specialize on trait `Iterator`
   --> library/core/src/iter/adapters/flatten.rs:409:36
    |
409 |     I: SourceIter + TrustedFused + Iterator,
    |                                    ^^^^^^^^

error: cannot specialize on trait `Iterator`
   --> library/core/src/iter/adapters/flatten.rs:935:8
    |
935 |     U: Iterator + OneShot,
    |        ^^^^^^^^

error: cannot specialize on trait `IntoIterator`
   --> library/core/src/iter/adapters/flatten.rs:934:23
    |
934 |     I: Iterator<Item: IntoIterator<IntoIter = U, Item = U::Item>>,
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: cannot specialize on trait `Iterator`
   --> library/core/src/iter/adapters/flatten.rs:934:8
    |
934 |     I: Iterator<Item: IntoIterator<IntoIter = U, Item = U::Item>>,
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

thread 'rustc' panicked at compiler/rustc_middle/src/ty/print/pretty.rs:2923:1:
could not lift for printing
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::option::expect_failed
   3: <rustc_middle::ty::sty::AliasTy as core::fmt::Display>::fmt
   4: core::fmt::write
   5: alloc::fmt::format::format_inner
   6: rustc_hir_analysis::impl_wf_check::min_specialization::check_min_specialization
   7: rustc_hir_analysis::impl_wf_check::check_mod_impl_wf
      [... omitted 3 frames ...]
   8: rustc_middle::query::plumbing::query_ensure_error_guaranteed::<rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::LocalModDefId, rustc_middle::query::erase::Erased<[u8; 1]>>, ()>
   9: std::panicking::try::<core::result::Result<(), rustc_span::ErrorGuaranteed>, core::panic::unwind_safe::AssertUnwindSafe<rustc_data_structures::sync::parallel::enabled::try_par_for_each_in<&[rustc_hir::hir_id::OwnerId], rustc_span::ErrorGuaranteed, <rustc_middle::hir::map::Map>::try_par_for_each_module<rustc_hir_analysis::check_crate::{closure#2}::{closure#0}>::{closure#0}>::{closure#0}::{closure#2}::{closure#0}>>
  10: std::panic::catch_unwind::<core::panic::unwind_safe::AssertUnwindSafe<rustc_data_structures::sync::parallel::enabled::try_par_for_each_in<&[rustc_hir::hir_id::OwnerId], rustc_span::ErrorGuaranteed, <rustc_middle::hir::map::Map>::try_par_for_each_module<rustc_hir_analysis::check_crate::{closure#2}::{closure#0}>::{closure#0}>::{closure#0}::{closure#2}::{closure#0}>, core::result::Result<(), rustc_span::ErrorGuaranteed>>
  11: <rustc_data_structures::sync::parallel::ParallelGuard>::run::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_data_structures::sync::parallel::enabled::try_par_for_each_in<&[rustc_hir::hir_id::OwnerId], rustc_span::ErrorGuaranteed, <rustc_middle::hir::map::Map>::try_par_for_each_module<rustc_hir_analysis::check_crate::{closure#2}::{closure#0}>::{closure#0}>::{closure#0}::{closure#2}::{closure#0}>
  12: rustc_data_structures::sync::parallel::enabled::try_par_for_each_in::<&[rustc_hir::hir_id::OwnerId], rustc_span::ErrorGuaranteed, <rustc_middle::hir::map::Map>::try_par_for_each_module<rustc_hir_analysis::check_crate::{closure#2}::{closure#0}>::{closure#0}>
  13: <rustc_session::session::Session>::time::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_hir_analysis::check_crate::{closure#2}>
  14: rustc_hir_analysis::check_crate
  15: rustc_interface::passes::analysis
      [... omitted 3 frames ...]
  16: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<<rustc_middle::ty::context::GlobalCtxt>::enter<rustc_driver_impl::run_compiler::{closure#0}::{closure#0}::{closure#3}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
  17: <rustc_middle::ty::context::GlobalCtxt>::enter::<rustc_driver_impl::run_compiler::{closure#0}::{closure#0}::{closure#3}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
  18: <rustc_interface::interface::Compiler>::enter::<rustc_driver_impl::run_compiler::{closure#0}::{closure#0}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_span::ErrorGuaranteed>>
  19: rustc_span::set_source_map::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}::{closure#0}>
  20: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
  21: rustc_span::create_session_globals_then::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: please attach the file at `/home/gh-bjorn3/rust/rustc-ice-2024-02-21T13_47_14-452133.txt` to your bug report

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -Z unstable-options -C symbol-mangling-version=legacy -Z unstable-options -Z unstable-options -Z macro-backtrace -C split-debuginfo=off -C force-frame-pointers=true -C prefer-dynamic -C llvm-args=-import-instr-limit=10 -Z inline-mir -C link-args=-Wl,-z,origin -C link-args=-Wl,-rpath,$ORIGIN/../lib -C embed-bitcode=yes -C lto=off -Z crate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/") -Z binary-dep-depinfo -Z force-unstable-if-unmarked

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [check_mod_impl_wf] checking that impls are well-formed in module `iter::adapters::flatten`
#1 [analysis] running analysis passes on this crate
end of query stack
error: cannot specialize on trait `Iterator`
   --> library/core/src/iter/adapters/fuse.rs:355:8
    |
355 |     I: FusedIterator,
    |        ^^^^^^^^^^^^^

error: cannot specialize on trait `Iterator`
   --> library/core/src/iter/adapters/peekable.rs:325:16
    |
325 | unsafe impl<I: Iterator> SourceIter for Peekable<I>
    |                ^^^^^^^^

error[E0119]: conflicting implementations of trait `SpecTake` for type `Take<_>`
   --> library/core/src/iter/adapters/take.rs:295:1
    |
263 | impl<I: Iterator> SpecTake for Take<I> {
    | -------------------------------------- first implementation here
...
295 | impl<I: Iterator + TrustedRandomAccess> SpecTake for Take<I> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Take<_>`

error[E0119]: conflicting implementations of trait `ZipImpl<_, _>` for type `Zip<_, _>`
   --> library/core/src/iter/adapters/zip.rs:254:1
    |
211 | / impl<A, B> ZipImpl<A, B> for Zip<A, B>
212 | | where
213 | |     A: Iterator,
214 | |     B: Iterator,
    | |________________- first implementation here
...
254 | / impl<A, B> ZipImpl<A, B> for Zip<A, B>
255 | | where
256 | |     A: TrustedRandomAccessNoCoerce + Iterator,
257 | |     B: TrustedRandomAccessNoCoerce + Iterator,
    | |______________________________________________^ conflicting implementation for `Zip<_, _>`

error[E0119]: conflicting implementations of trait `ZipImpl<_, _>` for type `Zip<_, _>`
   --> library/core/src/iter/adapters/zip.rs:295:1
    |
211 | / impl<A, B> ZipImpl<A, B> for Zip<A, B>
212 | | where
213 | |     A: Iterator,
214 | |     B: Iterator,
    | |________________- first implementation here
...
295 | / impl<A, B> ZipImpl<A, B> for Zip<A, B>
296 | | where
297 | |     A: TrustedRandomAccess + Iterator,
298 | |     B: TrustedRandomAccess + Iterator,
    | |______________________________________^ conflicting implementation for `Zip<_, _>`

error[E0119]: conflicting implementations of trait `ZipFmt<_, _>` for type `Zip<_, _>`
   --> library/core/src/iter/adapters/zip.rs:513:1
    |
507 |   impl<A: Debug, B: Debug> ZipFmt<A, B> for Zip<A, B> {
    |   --------------------------------------------------- first implementation here
...
513 | / impl<A: Debug + TrustedRandomAccessNoCoerce, B: Debug + TrustedRandomAccessNoCoerce> ZipFmt<A, B>
514 | |     for Zip<A, B>
    | |_________________^ conflicting implementation for `Zip<_, _>`

error[E0119]: conflicting implementations of trait `SpecTrustedRandomAccess`
   --> library/core/src/iter/adapters/zip.rs:634:1
    |
628 | unsafe impl<I: Iterator> SpecTrustedRandomAccess for I {
    | ------------------------------------------------------ first implementation here
...
634 | unsafe impl<I: Iterator + TrustedRandomAccessNoCoerce> SpecTrustedRandomAccess for I {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation

error: cannot specialize on trait `Iterator`
   --> library/core/src/iter/adapters/zip.rs:665:24
    |
665 | impl<A: TrustedLen, B: TrustedLen> SpecFold for Zip<A, B> {
    |                        ^^^^^^^^^^

error: cannot specialize on trait `Iterator`
   --> library/core/src/iter/adapters/zip.rs:665:9
    |
665 | impl<A: TrustedLen, B: TrustedLen> SpecFold for Zip<A, B> {
    |         ^^^^^^^^^^

error[E0119]: conflicting implementations of trait `RangeIteratorImpl` for type `Range<_>`
   --> library/core/src/iter/range.rs:726:1
    |
640 | impl<A: Step> RangeIteratorImpl for ops::Range<A> {
    | ------------------------------------------------- first implementation here
...
726 | impl<T: TrustedStep> RangeIteratorImpl for ops::Range<T> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Range<_>`

error[E0119]: conflicting implementations of trait `RangeInclusiveIteratorImpl` for type `RangeInclusive<_>`
    --> library/core/src/iter/range.rs:1126:1
     |
1032 | impl<A: Step> RangeInclusiveIteratorImpl for ops::RangeInclusive<A> {
     | ------------------------------------------------------------------- first implementation here
...
1126 | impl<T: TrustedStep> RangeInclusiveIteratorImpl for ops::RangeInclusive<T> {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `RangeInclusive<_>`

error: cannot specialize on trait `Clone`
    --> library/core/src/slice/mod.rs:4662:8
     |
4662 |     T: Copy,
     |        ^^^^

error: cannot specialize on trait `Clone`
  --> library/core/src/slice/specialize.rs:17:9
   |
17 | impl<T: Copy> SpecFill<T> for [T] {
   |         ^^^^

Some errors have detailed explanations: E0119, E0284.
For more information about an error, try `rustc --explain E0119`.
error: could not compile `core` (lib) due to 221 previous errors
Build completed unsuccessfully in 0:00:25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-reproducibility Area: Reproducible / deterministic builds A-testsuite Area: The testsuite used to check the correctness of rustc C-enhancement Category: An issue proposing an enhancement or a PR with one. C-feature-request Category: A feature request, i.e: not implemented / a PR. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

9 participants