1 error[E0433]: failed to resolve: use of undeclared type `Unresolved`
2 --> $DIR/assoc_type_bound_with_struct.rs:19:31
4 LL | fn issue_95327() where <u8 as Unresolved>::Assoc: String {}
5 | ^^^^^^^^^^ use of undeclared type `Unresolved`
7 error[E0404]: expected trait, found struct `String`
8 --> $DIR/assoc_type_bound_with_struct.rs:5:46
10 LL | struct Foo<T> where T: Bar, <T as Bar>::Baz: String {
13 ::: $SRC_DIR/alloc/src/string.rs:LL:COL
15 LL | pub trait ToString {
16 | ------------------ similarly named trait `ToString` defined here
18 help: constrain the associated type to `String`
20 LL | struct Foo<T> where T: Bar, T: Bar<Baz = String> {
21 | ~~~~~~~~~~~~~~~~~~~~
22 help: a trait with a similar name exists
24 LL | struct Foo<T> where T: Bar, <T as Bar>::Baz: ToString {
27 error[E0404]: expected trait, found struct `String`
28 --> $DIR/assoc_type_bound_with_struct.rs:9:54
30 LL | struct Qux<'a, T> where T: Bar, <&'a T as Bar>::Baz: String {
33 ::: $SRC_DIR/alloc/src/string.rs:LL:COL
35 LL | pub trait ToString {
36 | ------------------ similarly named trait `ToString` defined here
38 help: constrain the associated type to `String`
40 LL | struct Qux<'a, T> where T: Bar, &'a T: Bar<Baz = String> {
41 | ~~~~~~~~~~~~~~~~~~~~~~~~
42 help: a trait with a similar name exists
44 LL | struct Qux<'a, T> where T: Bar, <&'a T as Bar>::Baz: ToString {
47 error[E0404]: expected trait, found struct `String`
48 --> $DIR/assoc_type_bound_with_struct.rs:13:45
50 LL | fn foo<T: Bar>(_: T) where <T as Bar>::Baz: String {
53 ::: $SRC_DIR/alloc/src/string.rs:LL:COL
55 LL | pub trait ToString {
56 | ------------------ similarly named trait `ToString` defined here
58 help: constrain the associated type to `String`
60 LL | fn foo<T: Bar>(_: T) where T: Bar<Baz = String> {
61 | ~~~~~~~~~~~~~~~~~~~~
62 help: a trait with a similar name exists
64 LL | fn foo<T: Bar>(_: T) where <T as Bar>::Baz: ToString {
67 error[E0404]: expected trait, found struct `String`
68 --> $DIR/assoc_type_bound_with_struct.rs:16:57
70 LL | fn qux<'a, T: Bar>(_: &'a T) where <&'a T as Bar>::Baz: String {
73 ::: $SRC_DIR/alloc/src/string.rs:LL:COL
75 LL | pub trait ToString {
76 | ------------------ similarly named trait `ToString` defined here
78 help: constrain the associated type to `String`
80 LL | fn qux<'a, T: Bar>(_: &'a T) where &'a T: Bar<Baz = String> {
81 | ~~~~~~~~~~~~~~~~~~~~~~~~
82 help: a trait with a similar name exists
84 LL | fn qux<'a, T: Bar>(_: &'a T) where <&'a T as Bar>::Baz: ToString {
87 error[E0404]: expected trait, found struct `String`
88 --> $DIR/assoc_type_bound_with_struct.rs:19:51
90 LL | fn issue_95327() where <u8 as Unresolved>::Assoc: String {}
91 | ^^^^^^ help: a trait with a similar name exists: `ToString`
93 ::: $SRC_DIR/alloc/src/string.rs:LL:COL
95 LL | pub trait ToString {
96 | ------------------ similarly named trait `ToString` defined here
98 error: aborting due to 6 previous errors
100 Some errors have detailed explanations: E0404, E0433.
101 For more information about an error, try `rustc --explain E0404`.