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/issue-76535.base.stderr
+4-2
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,8 @@ LL | pub trait SuperTrait {
28
28
LL | type SubType<'a>: SubTrait where Self: 'a;
29
29
| ^^^^^^^ ...because it contains the generic associated type `SubType`
30
30
= help: consider moving `SubType` to another trait
31
-
= help: only type `SuperStruct` implements the trait, consider using it directly instead
31
+
= help: only type `SuperStruct` is seen to implement the trait in this crate, consider using it directly instead
32
+
= 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
32
33
33
34
error[E0038]: the trait `SuperTrait` cannot be made into an object
34
35
--> $DIR/issue-76535.rs:39:57
@@ -44,7 +45,8 @@ LL | pub trait SuperTrait {
44
45
LL | type SubType<'a>: SubTrait where Self: 'a;
45
46
| ^^^^^^^ ...because it contains the generic associated type `SubType`
46
47
= help: consider moving `SubType` to another trait
47
-
= help: only type `SuperStruct` implements the trait, consider using it directly instead
48
+
= help: only type `SuperStruct` is seen to implement the trait in this crate, consider using it directly instead
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
48
50
= note: required for the cast from `Box<SuperStruct>` to `Box<dyn SuperTrait<SubType = SubStruct<'_>>>`
0 commit comments