]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr
Auto merge of #106696 - kylematsuda:early-binder, r=lcnr
[rust.git] / tests / ui / suggestions / use-type-argument-instead-of-assoc-type.stderr
1 error[E0107]: this trait takes 2 generic arguments but 4 generic arguments were supplied
2   --> $DIR/use-type-argument-instead-of-assoc-type.rs:7:16
3    |
4 LL |     i: Box<dyn T<usize, usize, usize, usize, B=usize>>,
5    |                ^ expected 2 generic arguments
6    |
7 note: trait defined here, with 2 generic parameters: `X`, `Y`
8   --> $DIR/use-type-argument-instead-of-assoc-type.rs:1:11
9    |
10 LL | pub trait T<X, Y> {
11    |           ^ -  -
12 help: replace the generic bounds with the associated types
13    |
14 LL |     i: Box<dyn T<usize, usize, A = usize, C = usize, B=usize>>,
15    |                                +++        +++
16
17 error[E0191]: the value of the associated types `A` (from trait `T`), `C` (from trait `T`) must be specified
18   --> $DIR/use-type-argument-instead-of-assoc-type.rs:7:16
19    |
20 LL |     type A;
21    |     ------ `A` defined here
22 LL |     type B;
23 LL |     type C;
24    |     ------ `C` defined here
25 ...
26 LL |     i: Box<dyn T<usize, usize, usize, usize, B=usize>>,
27    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated types `A`, `C` must be specified
28
29 error: aborting due to 2 previous errors
30
31 Some errors have detailed explanations: E0107, E0191.
32 For more information about an error, try `rustc --explain E0107`.