]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-type-bounds/bounds-on-assoc-in-trait.stderr
Auto merge of #103600 - compiler-errors:early-binder-nits, r=spastorino
[rust.git] / src / test / ui / associated-type-bounds / bounds-on-assoc-in-trait.stderr
1 error[E0277]: `<<Self as Case1>::A as Iterator>::Item` doesn't implement `Debug`
2   --> $DIR/bounds-on-assoc-in-trait.rs:18:28
3    |
4 LL |     type A: Iterator<Item: Debug>;
5    |                            ^^^^^ `<<Self as Case1>::A as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
6    |
7    = help: the trait `Debug` is not implemented for `<<Self as Case1>::A as Iterator>::Item`
8 help: consider further restricting the associated type
9    |
10 LL | trait Case1 where <<Self as Case1>::A as Iterator>::Item: Debug {
11    |             +++++++++++++++++++++++++++++++++++++++++++++++++++
12
13 error[E0277]: the trait bound `<<Self as Foo>::Out as Baz>::Assoc: Default` is not satisfied
14   --> $DIR/bounds-on-assoc-in-trait.rs:35:38
15    |
16 LL | pub trait Foo { type Out: Baz<Assoc: Default>; }
17    |                                      ^^^^^^^ the trait `Default` is not implemented for `<<Self as Foo>::Out as Baz>::Assoc`
18    |
19 help: consider further restricting the associated type
20    |
21 LL | pub trait Foo where <<Self as Foo>::Out as Baz>::Assoc: Default { type Out: Baz<Assoc: Default>; }
22    |               +++++++++++++++++++++++++++++++++++++++++++++++++
23
24 error: aborting due to 2 previous errors
25
26 For more information about this error, try `rustc --explain E0277`.