1 error[E0308]: mismatched types
2 --> $DIR/missing-bounds.rs:11:11
4 LL | impl<B> Add for A<B> where B: Add {
5 | - this type parameter
8 | ^^^^^^^^^^^^^^ expected type parameter `B`, found associated type
10 = note: expected type parameter `B`
11 found associated type `<B as Add>::Output`
12 help: consider further restricting this bound
14 LL | impl<B> Add for A<B> where B: Add + Add<Output = B> {
17 error[E0308]: mismatched types
18 --> $DIR/missing-bounds.rs:21:14
20 LL | impl<B: Add> Add for C<B> {
21 | - this type parameter
23 LL | Self(self.0 + rhs.0)
24 | ^^^^^^^^^^^^^^ expected type parameter `B`, found associated type
26 = note: expected type parameter `B`
27 found associated type `<B as Add>::Output`
28 help: consider further restricting this bound
30 LL | impl<B: Add + Add<Output = B>> Add for C<B> {
33 error[E0369]: cannot add `B` to `B`
34 --> $DIR/missing-bounds.rs:31:21
36 LL | Self(self.0 + rhs.0)
41 help: consider restricting type parameter `B`
43 LL | impl<B: std::ops::Add<Output = B>> Add for D<B> {
44 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
46 error: aborting due to 3 previous errors
48 Some errors have detailed explanations: E0308, E0369.
49 For more information about an error, try `rustc --explain E0308`.