summaryrefslogtreecommitdiffstats
path: root/tests/ui/associated-type-bounds
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/associated-type-bounds')
-rw-r--r--tests/ui/associated-type-bounds/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.rs28
-rw-r--r--tests/ui/associated-type-bounds/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.stderr18
-rw-r--r--tests/ui/associated-type-bounds/duplicate.rs132
-rw-r--r--tests/ui/associated-type-bounds/duplicate.stderr144
-rw-r--r--tests/ui/associated-type-bounds/elision.stderr2
-rw-r--r--tests/ui/associated-type-bounds/issue-71443-1.stderr2
-rw-r--r--tests/ui/associated-type-bounds/overlaping-bound-suggestion.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.current.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.next.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.rs2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/basic.current_with.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/basic.current_without.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/basic.next_with.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/basic.next_without.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/basic.rs2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/basic.with.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/equality.current.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/equality.next.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/equality.rs2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/equality.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/missing.rs2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/missing.stderr2
-rw-r--r--tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.fixed14
-rw-r--r--tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.rs14
-rw-r--r--tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.stderr16
27 files changed, 254 insertions, 152 deletions
diff --git a/tests/ui/associated-type-bounds/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.rs b/tests/ui/associated-type-bounds/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.rs
new file mode 100644
index 000000000..c1047d856
--- /dev/null
+++ b/tests/ui/associated-type-bounds/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.rs
@@ -0,0 +1,28 @@
+use std::collections::HashMap;
+use std::hash::Hash;
+
+trait LowT: Identify {}
+
+trait Identify {
+ type Id: Clone + Hash + PartialEq + Eq;
+ fn identify(&self) -> Self::Id;
+}
+
+struct MapStore<L, I>
+where
+ L: LowT + Identify<Id = I>,
+{
+ lows: HashMap<I, L>,
+}
+
+impl<L, I> MapStore<L, I>
+where
+ L: LowT + Identify<Id = I>,
+ I: Clone + Hash + PartialEq + Eq,
+{
+ fn remove_low(&mut self, low: &impl LowT) {
+ let _low = self.lows.remove(low.identify()).unwrap(); //~ ERROR mismatched types
+ }
+}
+
+fn main() {}
diff --git a/tests/ui/associated-type-bounds/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.stderr b/tests/ui/associated-type-bounds/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.stderr
new file mode 100644
index 000000000..78bf93c32
--- /dev/null
+++ b/tests/ui/associated-type-bounds/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.stderr
@@ -0,0 +1,18 @@
+error[E0308]: mismatched types
+ --> $DIR/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.rs:24:37
+ |
+LL | let _low = self.lows.remove(low.identify()).unwrap();
+ | ------ ^^^^^^^^^^^^^^ expected `&I`, found associated type
+ | |
+ | arguments to this method are incorrect
+ |
+ = note: expected reference `&I`
+ found associated type `<impl LowT as Identify>::Id`
+ = help: consider constraining the associated type `<impl LowT as Identify>::Id` to `&I`
+ = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
+note: method defined here
+ --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/associated-type-bounds/duplicate.rs b/tests/ui/associated-type-bounds/duplicate.rs
index 4b8bf52c3..5019804d4 100644
--- a/tests/ui/associated-type-bounds/duplicate.rs
+++ b/tests/ui/associated-type-bounds/duplicate.rs
@@ -5,258 +5,258 @@ use std::iter;
use std::mem::ManuallyDrop;
struct SI1<T: Iterator<Item: Copy, Item: Send>> {
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
f: T,
}
struct SI2<T: Iterator<Item: Copy, Item: Copy>> {
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
f: T,
}
struct SI3<T: Iterator<Item: 'static, Item: 'static>> {
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
f: T,
}
struct SW1<T>
where
T: Iterator<Item: Copy, Item: Send>,
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
{
f: T,
}
struct SW2<T>
where
T: Iterator<Item: Copy, Item: Copy>,
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
{
f: T,
}
struct SW3<T>
where
T: Iterator<Item: 'static, Item: 'static>,
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
{
f: T,
}
enum EI1<T: Iterator<Item: Copy, Item: Send>> {
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
V(T),
}
enum EI2<T: Iterator<Item: Copy, Item: Copy>> {
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
V(T),
}
enum EI3<T: Iterator<Item: 'static, Item: 'static>> {
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
V(T),
}
enum EW1<T>
where
T: Iterator<Item: Copy, Item: Send>,
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
{
V(T),
}
enum EW2<T>
where
T: Iterator<Item: Copy, Item: Copy>,
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
{
V(T),
}
enum EW3<T>
where
T: Iterator<Item: 'static, Item: 'static>,
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
{
V(T),
}
union UI1<T: Iterator<Item: Copy, Item: Send>> {
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
f: ManuallyDrop<T>,
}
union UI2<T: Iterator<Item: Copy, Item: Copy>> {
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
f: ManuallyDrop<T>,
}
union UI3<T: Iterator<Item: 'static, Item: 'static>> {
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
f: ManuallyDrop<T>,
}
union UW1<T>
where
T: Iterator<Item: Copy, Item: Send>,
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
{
f: ManuallyDrop<T>,
}
union UW2<T>
where
T: Iterator<Item: Copy, Item: Copy>,
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
{
f: ManuallyDrop<T>,
}
union UW3<T>
where
T: Iterator<Item: 'static, Item: 'static>,
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
{
f: ManuallyDrop<T>,
}
fn FI1<T: Iterator<Item: Copy, Item: Send>>() {}
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
fn FI2<T: Iterator<Item: Copy, Item: Copy>>() {}
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
fn FI3<T: Iterator<Item: 'static, Item: 'static>>() {}
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
fn FW1<T>()
where
T: Iterator<Item: Copy, Item: Send>,
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
{
}
fn FW2<T>()
where
T: Iterator<Item: Copy, Item: Copy>,
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
{
}
fn FW3<T>()
where
T: Iterator<Item: 'static, Item: 'static>,
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
{
}
fn FRPIT1() -> impl Iterator<Item: Copy, Item: Send> {
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
iter::empty()
}
fn FRPIT2() -> impl Iterator<Item: Copy, Item: Copy> {
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
iter::empty()
}
fn FRPIT3() -> impl Iterator<Item: 'static, Item: 'static> {
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
iter::empty()
}
fn FAPIT1(_: impl Iterator<Item: Copy, Item: Send>) {}
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
fn FAPIT2(_: impl Iterator<Item: Copy, Item: Copy>) {}
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
fn FAPIT3(_: impl Iterator<Item: 'static, Item: 'static>) {}
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
type TAW1<T>
where
T: Iterator<Item: Copy, Item: Send>,
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
= T;
type TAW2<T>
where
T: Iterator<Item: Copy, Item: Copy>,
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
= T;
type TAW3<T>
where
T: Iterator<Item: 'static, Item: 'static>,
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
= T;
type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
trait TRI1<T: Iterator<Item: Copy, Item: Send>> {}
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
trait TRI2<T: Iterator<Item: Copy, Item: Copy>> {}
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
trait TRS1: Iterator<Item: Copy, Item: Send> {}
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
-//~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
+//~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
trait TRS2: Iterator<Item: Copy, Item: Copy> {}
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
-//~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
+//~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
trait TRS3: Iterator<Item: 'static, Item: 'static> {}
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
-//~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
+//~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
trait TRW1<T>
where
T: Iterator<Item: Copy, Item: Send>,
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
{
}
trait TRW2<T>
where
T: Iterator<Item: Copy, Item: Copy>,
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
{
}
trait TRW3<T>
where
T: Iterator<Item: 'static, Item: 'static>,
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
{
}
trait TRSW1
where
Self: Iterator<Item: Copy, Item: Send>,
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
- //~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
+ //~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
{
}
trait TRSW2
where
Self: Iterator<Item: Copy, Item: Copy>,
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
- //~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
+ //~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
{
}
trait TRSW3
where
Self: Iterator<Item: 'static, Item: 'static>,
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
- //~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
+ //~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
{
}
trait TRA1 {
type A: Iterator<Item: Copy, Item: Send>;
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
}
trait TRA2 {
type A: Iterator<Item: Copy, Item: Copy>;
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
}
trait TRA3 {
type A: Iterator<Item: 'static, Item: 'static>;
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+ //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
}
type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
fn main() {}
diff --git a/tests/ui/associated-type-bounds/duplicate.stderr b/tests/ui/associated-type-bounds/duplicate.stderr
index 08721eff7..3888e6223 100644
--- a/tests/ui/associated-type-bounds/duplicate.stderr
+++ b/tests/ui/associated-type-bounds/duplicate.stderr
@@ -1,4 +1,4 @@
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:7:36
|
LL | struct SI1<T: Iterator<Item: Copy, Item: Send>> {
@@ -6,7 +6,7 @@ LL | struct SI1<T: Iterator<Item: Copy, Item: Send>> {
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:11:36
|
LL | struct SI2<T: Iterator<Item: Copy, Item: Copy>> {
@@ -14,7 +14,7 @@ LL | struct SI2<T: Iterator<Item: Copy, Item: Copy>> {
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:15:39
|
LL | struct SI3<T: Iterator<Item: 'static, Item: 'static>> {
@@ -22,7 +22,7 @@ LL | struct SI3<T: Iterator<Item: 'static, Item: 'static>> {
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:21:29
|
LL | T: Iterator<Item: Copy, Item: Send>,
@@ -30,7 +30,7 @@ LL | T: Iterator<Item: Copy, Item: Send>,
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:28:29
|
LL | T: Iterator<Item: Copy, Item: Copy>,
@@ -38,7 +38,7 @@ LL | T: Iterator<Item: Copy, Item: Copy>,
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:35:32
|
LL | T: Iterator<Item: 'static, Item: 'static>,
@@ -46,7 +46,7 @@ LL | T: Iterator<Item: 'static, Item: 'static>,
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:41:34
|
LL | enum EI1<T: Iterator<Item: Copy, Item: Send>> {
@@ -54,7 +54,7 @@ LL | enum EI1<T: Iterator<Item: Copy, Item: Send>> {
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:45:34
|
LL | enum EI2<T: Iterator<Item: Copy, Item: Copy>> {
@@ -62,7 +62,7 @@ LL | enum EI2<T: Iterator<Item: Copy, Item: Copy>> {
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:49:37
|
LL | enum EI3<T: Iterator<Item: 'static, Item: 'static>> {
@@ -70,7 +70,7 @@ LL | enum EI3<T: Iterator<Item: 'static, Item: 'static>> {
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:55:29
|
LL | T: Iterator<Item: Copy, Item: Send>,
@@ -78,7 +78,7 @@ LL | T: Iterator<Item: Copy, Item: Send>,
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:62:29
|
LL | T: Iterator<Item: Copy, Item: Copy>,
@@ -86,7 +86,7 @@ LL | T: Iterator<Item: Copy, Item: Copy>,
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:69:32
|
LL | T: Iterator<Item: 'static, Item: 'static>,
@@ -94,7 +94,7 @@ LL | T: Iterator<Item: 'static, Item: 'static>,
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:75:35
|
LL | union UI1<T: Iterator<Item: Copy, Item: Send>> {
@@ -102,7 +102,7 @@ LL | union UI1<T: Iterator<Item: Copy, Item: Send>> {
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:79:35
|
LL | union UI2<T: Iterator<Item: Copy, Item: Copy>> {
@@ -110,7 +110,7 @@ LL | union UI2<T: Iterator<Item: Copy, Item: Copy>> {
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:83:38
|
LL | union UI3<T: Iterator<Item: 'static, Item: 'static>> {
@@ -118,7 +118,7 @@ LL | union UI3<T: Iterator<Item: 'static, Item: 'static>> {
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:89:29
|
LL | T: Iterator<Item: Copy, Item: Send>,
@@ -126,7 +126,7 @@ LL | T: Iterator<Item: Copy, Item: Send>,
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:96:29
|
LL | T: Iterator<Item: Copy, Item: Copy>,
@@ -134,7 +134,7 @@ LL | T: Iterator<Item: Copy, Item: Copy>,
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:103:32
|
LL | T: Iterator<Item: 'static, Item: 'static>,
@@ -142,7 +142,7 @@ LL | T: Iterator<Item: 'static, Item: 'static>,
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:109:32
|
LL | fn FI1<T: Iterator<Item: Copy, Item: Send>>() {}
@@ -150,7 +150,7 @@ LL | fn FI1<T: Iterator<Item: Copy, Item: Send>>() {}
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:111:32
|
LL | fn FI2<T: Iterator<Item: Copy, Item: Copy>>() {}
@@ -158,7 +158,7 @@ LL | fn FI2<T: Iterator<Item: Copy, Item: Copy>>() {}
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:113:35
|
LL | fn FI3<T: Iterator<Item: 'static, Item: 'static>>() {}
@@ -166,7 +166,7 @@ LL | fn FI3<T: Iterator<Item: 'static, Item: 'static>>() {}
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:117:29
|
LL | T: Iterator<Item: Copy, Item: Send>,
@@ -174,7 +174,7 @@ LL | T: Iterator<Item: Copy, Item: Send>,
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:123:29
|
LL | T: Iterator<Item: Copy, Item: Copy>,
@@ -182,7 +182,7 @@ LL | T: Iterator<Item: Copy, Item: Copy>,
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:129:32
|
LL | T: Iterator<Item: 'static, Item: 'static>,
@@ -190,7 +190,7 @@ LL | T: Iterator<Item: 'static, Item: 'static>,
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:134:42
|
LL | fn FRPIT1() -> impl Iterator<Item: Copy, Item: Send> {
@@ -198,7 +198,7 @@ LL | fn FRPIT1() -> impl Iterator<Item: Copy, Item: Send> {
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:138:42
|
LL | fn FRPIT2() -> impl Iterator<Item: Copy, Item: Copy> {
@@ -206,7 +206,7 @@ LL | fn FRPIT2() -> impl Iterator<Item: Copy, Item: Copy> {
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:142:45
|
LL | fn FRPIT3() -> impl Iterator<Item: 'static, Item: 'static> {
@@ -214,7 +214,7 @@ LL | fn FRPIT3() -> impl Iterator<Item: 'static, Item: 'static> {
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:146:40
|
LL | fn FAPIT1(_: impl Iterator<Item: Copy, Item: Send>) {}
@@ -222,7 +222,7 @@ LL | fn FAPIT1(_: impl Iterator<Item: Copy, Item: Send>) {}
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:148:40
|
LL | fn FAPIT2(_: impl Iterator<Item: Copy, Item: Copy>) {}
@@ -230,7 +230,7 @@ LL | fn FAPIT2(_: impl Iterator<Item: Copy, Item: Copy>) {}
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:150:43
|
LL | fn FAPIT3(_: impl Iterator<Item: 'static, Item: 'static>) {}
@@ -238,7 +238,7 @@ LL | fn FAPIT3(_: impl Iterator<Item: 'static, Item: 'static>) {}
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:153:35
|
LL | type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
@@ -246,7 +246,7 @@ LL | type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:155:35
|
LL | type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
@@ -254,7 +254,7 @@ LL | type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:157:38
|
LL | type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
@@ -262,7 +262,7 @@ LL | type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:161:29
|
LL | T: Iterator<Item: Copy, Item: Send>,
@@ -270,7 +270,7 @@ LL | T: Iterator<Item: Copy, Item: Send>,
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:166:29
|
LL | T: Iterator<Item: Copy, Item: Copy>,
@@ -278,7 +278,7 @@ LL | T: Iterator<Item: Copy, Item: Copy>,
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:171:32
|
LL | T: Iterator<Item: 'static, Item: 'static>,
@@ -286,7 +286,7 @@ LL | T: Iterator<Item: 'static, Item: 'static>,
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:175:36
|
LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
@@ -294,7 +294,7 @@ LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:177:36
|
LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
@@ -302,7 +302,7 @@ LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:179:39
|
LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
@@ -310,7 +310,7 @@ LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:181:40
|
LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
@@ -318,7 +318,7 @@ LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:183:40
|
LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
@@ -326,7 +326,7 @@ LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:185:43
|
LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
@@ -334,7 +334,7 @@ LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:188:36
|
LL | trait TRI1<T: Iterator<Item: Copy, Item: Send>> {}
@@ -342,7 +342,7 @@ LL | trait TRI1<T: Iterator<Item: Copy, Item: Send>> {}
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:190:36
|
LL | trait TRI2<T: Iterator<Item: Copy, Item: Copy>> {}
@@ -350,7 +350,7 @@ LL | trait TRI2<T: Iterator<Item: Copy, Item: Copy>> {}
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:192:39
|
LL | trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
@@ -358,7 +358,7 @@ LL | trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:194:34
|
LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
@@ -366,15 +366,17 @@ LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:194:34
|
LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
+ |
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:197:34
|
LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
@@ -382,15 +384,17 @@ LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:197:34
|
LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
+ |
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:200:37
|
LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
@@ -398,15 +402,17 @@ LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:200:37
|
LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
+ |
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:205:29
|
LL | T: Iterator<Item: Copy, Item: Send>,
@@ -414,7 +420,7 @@ LL | T: Iterator<Item: Copy, Item: Send>,
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:211:29
|
LL | T: Iterator<Item: Copy, Item: Copy>,
@@ -422,7 +428,7 @@ LL | T: Iterator<Item: Copy, Item: Copy>,
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:217:32
|
LL | T: Iterator<Item: 'static, Item: 'static>,
@@ -430,7 +436,7 @@ LL | T: Iterator<Item: 'static, Item: 'static>,
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:223:32
|
LL | Self: Iterator<Item: Copy, Item: Send>,
@@ -438,15 +444,17 @@ LL | Self: Iterator<Item: Copy, Item: Send>,
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:223:32
|
LL | Self: Iterator<Item: Copy, Item: Send>,
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
+ |
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:230:32
|
LL | Self: Iterator<Item: Copy, Item: Copy>,
@@ -454,15 +462,17 @@ LL | Self: Iterator<Item: Copy, Item: Copy>,
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:230:32
|
LL | Self: Iterator<Item: Copy, Item: Copy>,
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
+ |
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:237:35
|
LL | Self: Iterator<Item: 'static, Item: 'static>,
@@ -470,15 +480,17 @@ LL | Self: Iterator<Item: 'static, Item: 'static>,
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:237:35
|
LL | Self: Iterator<Item: 'static, Item: 'static>,
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
+ |
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:255:40
|
LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
@@ -486,7 +498,7 @@ LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:257:44
|
LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
@@ -494,7 +506,7 @@ LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:259:43
|
LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
@@ -502,7 +514,7 @@ LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:243:34
|
LL | type A: Iterator<Item: Copy, Item: Send>;
@@ -510,7 +522,7 @@ LL | type A: Iterator<Item: Copy, Item: Send>;
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:247:34
|
LL | type A: Iterator<Item: Copy, Item: Copy>;
@@ -518,7 +530,7 @@ LL | type A: Iterator<Item: Copy, Item: Copy>;
| |
| `Item` bound here first
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
--> $DIR/duplicate.rs:251:37
|
LL | type A: Iterator<Item: 'static, Item: 'static>;
diff --git a/tests/ui/associated-type-bounds/elision.stderr b/tests/ui/associated-type-bounds/elision.stderr
index cc10bbcc0..a29e32a78 100644
--- a/tests/ui/associated-type-bounds/elision.stderr
+++ b/tests/ui/associated-type-bounds/elision.stderr
@@ -17,7 +17,7 @@ LL | fn f(x: &mut dyn Iterator<Item: Iterator<Item = &'_ ()>>) -> Option<&'_ ()>
| ----------------------------- -------------- ^^^^^^^^ expected `Option<&()>`, found `Option<impl Iterator<Item = &'_ ()>>`
| | |
| | expected `Option<&()>` because of return type
- | this type parameter
+ | found this type parameter
|
= note: expected enum `Option<&()>`
found enum `Option<impl Iterator<Item = &'_ ()>>`
diff --git a/tests/ui/associated-type-bounds/issue-71443-1.stderr b/tests/ui/associated-type-bounds/issue-71443-1.stderr
index 15cc9646b..09c8ec2e2 100644
--- a/tests/ui/associated-type-bounds/issue-71443-1.stderr
+++ b/tests/ui/associated-type-bounds/issue-71443-1.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
--> $DIR/issue-71443-1.rs:6:5
|
LL | fn hello<F: for<'a> Iterator<Item: 'a>>() {
- | - help: try adding a return type: `-> Incorrect`
+ | - help: try adding a return type: `-> Incorrect`
LL | Incorrect
| ^^^^^^^^^ expected `()`, found `Incorrect`
diff --git a/tests/ui/associated-type-bounds/overlaping-bound-suggestion.stderr b/tests/ui/associated-type-bounds/overlaping-bound-suggestion.stderr
index 61299550e..2a308f837 100644
--- a/tests/ui/associated-type-bounds/overlaping-bound-suggestion.stderr
+++ b/tests/ui/associated-type-bounds/overlaping-bound-suggestion.stderr
@@ -1,4 +1,4 @@
-error[E0191]: the value of the associated types `IntoIter` (from trait `IntoIterator`), `IntoIter` (from trait `IntoIterator`), `Item` (from trait `IntoIterator`), `Item` (from trait `IntoIterator`) must be specified
+error[E0191]: the value of the associated types `Item`, `Item`, `IntoIter` and `IntoIter` in `IntoIterator` must be specified
--> $DIR/overlaping-bound-suggestion.rs:7:13
|
LL | inner: <IntoIterator<Item: IntoIterator<Item: >>::IntoIterator as Item>::Core,
diff --git a/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.current.stderr b/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.current.stderr
index b8be132e6..65f7a72fb 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.current.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.current.stderr
@@ -25,7 +25,7 @@ LL | fn bar<T: Trait<method() -> (): Send>>() {}
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/bad-inputs-and-output.rs:5:12
|
-LL | #![feature(return_type_notation, async_fn_in_trait)]
+LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
diff --git a/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.next.stderr b/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.next.stderr
index b8be132e6..65f7a72fb 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.next.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.next.stderr
@@ -25,7 +25,7 @@ LL | fn bar<T: Trait<method() -> (): Send>>() {}
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/bad-inputs-and-output.rs:5:12
|
-LL | #![feature(return_type_notation, async_fn_in_trait)]
+LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
diff --git a/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.rs b/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.rs
index 58ce41d1a..4f332fa13 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.rs
+++ b/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.rs
@@ -1,6 +1,6 @@
// edition: 2021
-#![feature(return_type_notation, async_fn_in_trait)]
+#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait Trait {
diff --git a/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.stderr b/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.stderr
index 95ef7d82f..1714dac12 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.stderr
@@ -25,7 +25,7 @@ LL | fn bar<T: Trait<method() -> (): Send>>() {}
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/bad-inputs-and-output.rs:3:12
|
-LL | #![feature(return_type_notation, async_fn_in_trait)]
+LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
diff --git a/tests/ui/associated-type-bounds/return-type-notation/basic.current_with.stderr b/tests/ui/associated-type-bounds/return-type-notation/basic.current_with.stderr
index 98c1a2827..c4dc5d362 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/basic.current_with.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/basic.current_with.stderr
@@ -1,7 +1,7 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/basic.rs:8:12
|
-LL | #![feature(return_type_notation, async_fn_in_trait)]
+LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
diff --git a/tests/ui/associated-type-bounds/return-type-notation/basic.current_without.stderr b/tests/ui/associated-type-bounds/return-type-notation/basic.current_without.stderr
index 1066c420c..6c2645ae5 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/basic.current_without.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/basic.current_without.stderr
@@ -1,7 +1,7 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/basic.rs:8:12
|
-LL | #![feature(return_type_notation, async_fn_in_trait)]
+LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
diff --git a/tests/ui/associated-type-bounds/return-type-notation/basic.next_with.stderr b/tests/ui/associated-type-bounds/return-type-notation/basic.next_with.stderr
index 98c1a2827..c4dc5d362 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/basic.next_with.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/basic.next_with.stderr
@@ -1,7 +1,7 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/basic.rs:8:12
|
-LL | #![feature(return_type_notation, async_fn_in_trait)]
+LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
diff --git a/tests/ui/associated-type-bounds/return-type-notation/basic.next_without.stderr b/tests/ui/associated-type-bounds/return-type-notation/basic.next_without.stderr
index 1066c420c..6c2645ae5 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/basic.next_without.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/basic.next_without.stderr
@@ -1,7 +1,7 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/basic.rs:8:12
|
-LL | #![feature(return_type_notation, async_fn_in_trait)]
+LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
diff --git a/tests/ui/associated-type-bounds/return-type-notation/basic.rs b/tests/ui/associated-type-bounds/return-type-notation/basic.rs
index 3dd9249a7..7f0647534 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/basic.rs
+++ b/tests/ui/associated-type-bounds/return-type-notation/basic.rs
@@ -2,7 +2,7 @@
// edition: 2021
// [with] check-pass
-#![feature(return_type_notation, async_fn_in_trait)]
+#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait Foo {
diff --git a/tests/ui/associated-type-bounds/return-type-notation/basic.with.stderr b/tests/ui/associated-type-bounds/return-type-notation/basic.with.stderr
index 9962f4706..9d4bb356c 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/basic.with.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/basic.with.stderr
@@ -1,7 +1,7 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/basic.rs:5:12
|
-LL | #![feature(return_type_notation, async_fn_in_trait)]
+LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
diff --git a/tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr b/tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr
index edce1045e..5b96676d0 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr
@@ -1,7 +1,7 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/basic.rs:5:12
|
-LL | #![feature(return_type_notation, async_fn_in_trait)]
+LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
diff --git a/tests/ui/associated-type-bounds/return-type-notation/equality.current.stderr b/tests/ui/associated-type-bounds/return-type-notation/equality.current.stderr
index b631dd0eb..d2a445f33 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/equality.current.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/equality.current.stderr
@@ -1,7 +1,7 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/equality.rs:5:12
|
-LL | #![feature(return_type_notation, async_fn_in_trait)]
+LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
diff --git a/tests/ui/associated-type-bounds/return-type-notation/equality.next.stderr b/tests/ui/associated-type-bounds/return-type-notation/equality.next.stderr
index b631dd0eb..d2a445f33 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/equality.next.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/equality.next.stderr
@@ -1,7 +1,7 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/equality.rs:5:12
|
-LL | #![feature(return_type_notation, async_fn_in_trait)]
+LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
diff --git a/tests/ui/associated-type-bounds/return-type-notation/equality.rs b/tests/ui/associated-type-bounds/return-type-notation/equality.rs
index 6884305d7..d5a29616a 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/equality.rs
+++ b/tests/ui/associated-type-bounds/return-type-notation/equality.rs
@@ -1,6 +1,6 @@
// edition: 2021
-#![feature(return_type_notation, async_fn_in_trait)]
+#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
use std::future::Future;
diff --git a/tests/ui/associated-type-bounds/return-type-notation/equality.stderr b/tests/ui/associated-type-bounds/return-type-notation/equality.stderr
index 490bfdc4c..1a2f84715 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/equality.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/equality.stderr
@@ -1,7 +1,7 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/equality.rs:3:12
|
-LL | #![feature(return_type_notation, async_fn_in_trait)]
+LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
diff --git a/tests/ui/associated-type-bounds/return-type-notation/missing.rs b/tests/ui/associated-type-bounds/return-type-notation/missing.rs
index a52562d78..0679b96f6 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/missing.rs
+++ b/tests/ui/associated-type-bounds/return-type-notation/missing.rs
@@ -1,6 +1,6 @@
// edition: 2021
-#![feature(return_type_notation, async_fn_in_trait)]
+#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
trait Trait {
diff --git a/tests/ui/associated-type-bounds/return-type-notation/missing.stderr b/tests/ui/associated-type-bounds/return-type-notation/missing.stderr
index 5b1c4cb0b..fb6538fa0 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/missing.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/missing.stderr
@@ -1,7 +1,7 @@
warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/missing.rs:3:12
|
-LL | #![feature(return_type_notation, async_fn_in_trait)]
+LL | #![feature(return_type_notation)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
diff --git a/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.fixed b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.fixed
new file mode 100644
index 000000000..b9f26a402
--- /dev/null
+++ b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.fixed
@@ -0,0 +1,14 @@
+// run-rustfix
+trait O {
+ type M;
+}
+trait U<A: O> {
+ const N: A::M;
+}
+impl<D> O for D {
+ type M = u8;
+}
+impl<C: O<M = u8>> U<C> for u16 {
+ const N: C::M = 4u8; //~ ERROR mismatched types
+}
+fn main() {}
diff --git a/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.rs b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.rs
new file mode 100644
index 000000000..abff6af73
--- /dev/null
+++ b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.rs
@@ -0,0 +1,14 @@
+// run-rustfix
+trait O {
+ type M;
+}
+trait U<A: O> {
+ const N: A::M;
+}
+impl<D> O for D {
+ type M = u8;
+}
+impl<C: O> U<C> for u16 {
+ const N: C::M = 4u8; //~ ERROR mismatched types
+}
+fn main() {}
diff --git a/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.stderr b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.stderr
new file mode 100644
index 000000000..b104f38ce
--- /dev/null
+++ b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.stderr
@@ -0,0 +1,16 @@
+error[E0308]: mismatched types
+ --> $DIR/suggest-contraining-assoc-type-because-of-assoc-const.rs:12:21
+ |
+LL | const N: C::M = 4u8;
+ | ^^^ expected associated type, found `u8`
+ |
+ = note: expected associated type `<C as O>::M`
+ found type `u8`
+help: consider constraining the associated type `<C as O>::M` to `u8`
+ |
+LL | impl<C: O<M = u8>> U<C> for u16 {
+ | ++++++++
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.