]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/generic-associated-types-where.stderr
Rollup merge of #102954 - GuillaumeGomez:cfg-hide-attr-checks, r=Manishearth
[rust.git] / src / test / ui / generic-associated-types / generic-associated-types-where.stderr
1 error[E0277]: `T` doesn't implement `std::fmt::Display`
2   --> $DIR/generic-associated-types-where.rs:18:22
3    |
4 LL |     type Assoc2<T> = Vec<T>;
5    |                      ^^^^^^ `T` cannot be formatted with the default formatter
6    |
7    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
8 help: consider restricting type parameter `T`
9    |
10 LL |     type Assoc2<T: std::fmt::Display> = Vec<T>;
11    |                  +++++++++++++++++++
12
13 error[E0276]: impl has stricter requirements than trait
14   --> $DIR/generic-associated-types-where.rs:20:38
15    |
16 LL |     type Assoc3<T>;
17    |     -------------- definition of `Assoc3` from trait
18 ...
19 LL |     type Assoc3<T> = Vec<T> where T: Iterator;
20    |                                      ^^^^^^^^ impl has extra requirement `T: Iterator`
21
22 error: aborting due to 2 previous errors
23
24 Some errors have detailed explanations: E0276, E0277.
25 For more information about an error, try `rustc --explain E0276`.