You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/ui/generic-associated-types/gat-in-trait-path.base.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ LL | type A<'a> where Self: 'a;
51
51
= help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `Foo` for this new enum and using it instead:
52
52
Fooy
53
53
Fooer<T>
54
-
= note: required for the cast from `Box<Fooer<{integer}>>` to `Box<(dyn Foo<A = &'a ()> + 'static)>`
54
+
= note: required for the cast from `Box<Fooer<{integer}>>` to `Box<(dyn Foo<A<'a> = &'a ()> + 'static)>`
Copy file name to clipboardExpand all lines: tests/ui/generic-associated-types/issue-76535.base.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ LL | type SubType<'a>: SubTrait where Self: 'a;
47
47
= help: consider moving `SubType` to another trait
48
48
= help: only type `SuperStruct` is seen to implement the trait in this crate, consider using it directly instead
49
49
= note: `SuperTrait` can be implemented in other crates; if you want to support your users passing their own types here, you can't refer to a specific type
50
-
= note: required for the cast from `Box<SuperStruct>` to `Box<dyn SuperTrait<SubType = SubStruct<'_>>>`
50
+
= note: required for the cast from `Box<SuperStruct>` to `Box<dyn SuperTrait<SubType<'_> = SubStruct<'_>>>`
Copy file name to clipboardExpand all lines: tests/ui/generic-associated-types/issue-79422.base.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ LL | type VRefCont<'a>: RefCont<'a, V> where Self: 'a;
49
49
= help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `MapLike` for this new enum and using it instead:
50
50
std::collections::BTreeMap<K, V>
51
51
Source
52
-
= note: required for the cast from `Box<BTreeMap<u8, u8>>` to `Box<dyn MapLike<u8, u8, VRefCont = (dyn RefCont<'_, u8> + 'static)>>`
52
+
= note: required for the cast from `Box<BTreeMap<u8, u8>>` to `Box<dyn MapLike<u8, u8, VRefCont<'_> = (dyn RefCont<'_, u8> + 'static)>>`
= help: `&u8` implements `RefCont` so you could box the found value and coerce it to the trait object `Box<dyn RefCont>`, you will have to change the expected type as well
31
-
= note: required for the cast from `Box<BTreeMap<u8, u8>>` to `Box<dyn MapLike<u8, u8, VRefCont = (dyn RefCont<'_, u8> + 'static)>>`
31
+
= note: required for the cast from `Box<BTreeMap<u8, u8>>` to `Box<dyn MapLike<u8, u8, VRefCont<'_> = (dyn RefCont<'_, u8> + 'static)>>`
= note: this associated type has a `where Self: Sized` bound, and while the associated type can be specified, it cannot be used because trait objects are never `Sized`
8
+
= note: `#[warn(unused_associated_type_bounds)]` on by default
0 commit comments