]>
Commit | Line | Data |
---|---|---|
a2a8927a | 1 | error: equality constraints are not yet supported in `where` clauses |
04454e1e | 2 | --> $DIR/missing-bounds.rs:35:33 |
a2a8927a XL |
3 | | |
4 | LL | impl<B: Add> Add for E<B> where <B as Add>::Output = B { | |
5 | | ^^^^^^^^^^^^^^^^^^^^^^ not supported | |
6 | | | |
7 | = note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information | |
8 | help: if `Output` is an associated type you're trying to set, use the associated type binding syntax | |
9 | | | |
10 | LL | impl<B: Add> Add for E<B> where B: Add<Output = B> { | |
11 | | ~~~~~~~~~~~~~~~~~~ | |
12 | ||
f9f354fc | 13 | error[E0308]: mismatched types |
04454e1e | 14 | --> $DIR/missing-bounds.rs:9:11 |
f9f354fc XL |
15 | | |
16 | LL | impl<B> Add for A<B> where B: Add { | |
17 | | - this type parameter | |
18 | ... | |
19 | LL | A(self.0 + rhs.0) | |
923072b8 FG |
20 | | - ^^^^^^^^^^^^^^ expected type parameter `B`, found associated type |
21 | | | | |
22 | | arguments to this struct are incorrect | |
f9f354fc XL |
23 | | |
24 | = note: expected type parameter `B` | |
1b1a35ee | 25 | found associated type `<B as Add>::Output` |
923072b8 FG |
26 | note: tuple struct defined here |
27 | --> $DIR/missing-bounds.rs:3:8 | |
28 | | | |
29 | LL | struct A<B>(B); | |
30 | | ^ | |
f9f354fc XL |
31 | help: consider further restricting this bound |
32 | | | |
1b1a35ee | 33 | LL | impl<B> Add for A<B> where B: Add + Add<Output = B> { |
94222f64 | 34 | | +++++++++++++++++ |
f9f354fc XL |
35 | |
36 | error[E0308]: mismatched types | |
04454e1e | 37 | --> $DIR/missing-bounds.rs:19:14 |
f9f354fc XL |
38 | | |
39 | LL | impl<B: Add> Add for C<B> { | |
40 | | - this type parameter | |
41 | ... | |
42 | LL | Self(self.0 + rhs.0) | |
923072b8 FG |
43 | | ---- ^^^^^^^^^^^^^^ expected type parameter `B`, found associated type |
44 | | | | |
45 | | arguments to this function are incorrect | |
f9f354fc XL |
46 | | |
47 | = note: expected type parameter `B` | |
1b1a35ee | 48 | found associated type `<B as Add>::Output` |
923072b8 FG |
49 | note: tuple struct defined here |
50 | --> $DIR/missing-bounds.rs:13:8 | |
51 | | | |
52 | LL | struct C<B>(B); | |
53 | | ^ | |
f9f354fc XL |
54 | help: consider further restricting this bound |
55 | | | |
1b1a35ee | 56 | LL | impl<B: Add + Add<Output = B>> Add for C<B> { |
94222f64 | 57 | | +++++++++++++++++ |
f9f354fc XL |
58 | |
59 | error[E0369]: cannot add `B` to `B` | |
04454e1e | 60 | --> $DIR/missing-bounds.rs:29:21 |
f9f354fc XL |
61 | | |
62 | LL | Self(self.0 + rhs.0) | |
63 | | ------ ^ ----- B | |
64 | | | | |
65 | | B | |
66 | | | |
67 | help: consider restricting type parameter `B` | |
68 | | | |
04454e1e FG |
69 | LL | impl<B: std::ops::Add> Add for D<B> { |
70 | | +++++++++++++++ | |
f9f354fc | 71 | |
a2a8927a | 72 | error[E0308]: mismatched types |
04454e1e | 73 | --> $DIR/missing-bounds.rs:40:14 |
a2a8927a XL |
74 | | |
75 | LL | impl<B: Add> Add for E<B> where <B as Add>::Output = B { | |
76 | | - this type parameter | |
77 | ... | |
78 | LL | Self(self.0 + rhs.0) | |
923072b8 FG |
79 | | ---- ^^^^^^^^^^^^^^ expected type parameter `B`, found associated type |
80 | | | | |
81 | | arguments to this function are incorrect | |
a2a8927a XL |
82 | | |
83 | = note: expected type parameter `B` | |
84 | found associated type `<B as Add>::Output` | |
923072b8 FG |
85 | note: tuple struct defined here |
86 | --> $DIR/missing-bounds.rs:33:8 | |
87 | | | |
88 | LL | struct E<B>(B); | |
89 | | ^ | |
04454e1e | 90 | help: consider further restricting this bound |
a2a8927a | 91 | | |
04454e1e FG |
92 | LL | impl<B: Add + Add<Output = B>> Add for E<B> where <B as Add>::Output = B { |
93 | | +++++++++++++++++ | |
a2a8927a XL |
94 | |
95 | error: aborting due to 5 previous errors | |
f9f354fc XL |
96 | |
97 | Some errors have detailed explanations: E0308, E0369. | |
98 | For more information about an error, try `rustc --explain E0308`. |