error: equality constraints are not yet supported in `where` clauses
- --> $DIR/missing-bounds.rs:35:33
+ --> $DIR/missing-bounds.rs:37:33
|
LL | impl<B: Add> Add for E<B> where <B as Add>::Output = B {
| ^^^^^^^^^^^^^^^^^^^^^^ not supported
| ~~~~~~~~~~~~~~~~~~
error[E0308]: mismatched types
- --> $DIR/missing-bounds.rs:9:11
+ --> $DIR/missing-bounds.rs:11:11
|
LL | impl<B> Add for A<B> where B: Add {
| - this type parameter
= note: expected type parameter `B`
found associated type `<B as Add>::Output`
note: tuple struct defined here
- --> $DIR/missing-bounds.rs:3:8
+ --> $DIR/missing-bounds.rs:5:8
|
LL | struct A<B>(B);
| ^
| +++++++++++++++++
error[E0308]: mismatched types
- --> $DIR/missing-bounds.rs:19:14
+ --> $DIR/missing-bounds.rs:21:14
|
LL | impl<B: Add> Add for C<B> {
| - this type parameter
= note: expected type parameter `B`
found associated type `<B as Add>::Output`
note: tuple struct defined here
- --> $DIR/missing-bounds.rs:13:8
+ --> $DIR/missing-bounds.rs:15:8
|
LL | struct C<B>(B);
| ^
| +++++++++++++++++
error[E0369]: cannot add `B` to `B`
- --> $DIR/missing-bounds.rs:29:21
+ --> $DIR/missing-bounds.rs:31:21
|
LL | Self(self.0 + rhs.0)
| ------ ^ ----- B
|
help: consider restricting type parameter `B`
|
-LL | impl<B: std::ops::Add> Add for D<B> {
- | +++++++++++++++
+LL | impl<B: std::ops::Add<Output=B>> Add for D<B> {
+ | +++++++++++++++++++++++++
error[E0308]: mismatched types
- --> $DIR/missing-bounds.rs:40:14
+ --> $DIR/missing-bounds.rs:42:14
|
LL | impl<B: Add> Add for E<B> where <B as Add>::Output = B {
| - this type parameter
= note: expected type parameter `B`
found associated type `<B as Add>::Output`
note: tuple struct defined here
- --> $DIR/missing-bounds.rs:33:8
+ --> $DIR/missing-bounds.rs:35:8
|
LL | struct E<B>(B);
| ^