]> git.proxmox.com Git - rustc.git/blob - src/test/ui/generic-associated-types/missing-bounds.stderr
New upstream version 1.64.0+dfsg1
[rustc.git] / src / test / ui / generic-associated-types / missing-bounds.stderr
1 error: equality constraints are not yet supported in `where` clauses
2 --> $DIR/missing-bounds.rs:37:33
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
13 error[E0308]: mismatched types
14 --> $DIR/missing-bounds.rs:11:11
15 |
16 LL | impl<B> Add for A<B> where B: Add {
17 | - this type parameter
18 ...
19 LL | A(self.0 + rhs.0)
20 | - ^^^^^^^^^^^^^^ expected type parameter `B`, found associated type
21 | |
22 | arguments to this struct are incorrect
23 |
24 = note: expected type parameter `B`
25 found associated type `<B as Add>::Output`
26 note: tuple struct defined here
27 --> $DIR/missing-bounds.rs:5:8
28 |
29 LL | struct A<B>(B);
30 | ^
31 help: consider further restricting this bound
32 |
33 LL | impl<B> Add for A<B> where B: Add + Add<Output = B> {
34 | +++++++++++++++++
35
36 error[E0308]: mismatched types
37 --> $DIR/missing-bounds.rs:21:14
38 |
39 LL | impl<B: Add> Add for C<B> {
40 | - this type parameter
41 ...
42 LL | Self(self.0 + rhs.0)
43 | ---- ^^^^^^^^^^^^^^ expected type parameter `B`, found associated type
44 | |
45 | arguments to this function are incorrect
46 |
47 = note: expected type parameter `B`
48 found associated type `<B as Add>::Output`
49 note: tuple struct defined here
50 --> $DIR/missing-bounds.rs:15:8
51 |
52 LL | struct C<B>(B);
53 | ^
54 help: consider further restricting this bound
55 |
56 LL | impl<B: Add + Add<Output = B>> Add for C<B> {
57 | +++++++++++++++++
58
59 error[E0369]: cannot add `B` to `B`
60 --> $DIR/missing-bounds.rs:31:21
61 |
62 LL | Self(self.0 + rhs.0)
63 | ------ ^ ----- B
64 | |
65 | B
66 |
67 help: consider restricting type parameter `B`
68 |
69 LL | impl<B: std::ops::Add<Output=B>> Add for D<B> {
70 | +++++++++++++++++++++++++
71
72 error[E0308]: mismatched types
73 --> $DIR/missing-bounds.rs:42:14
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)
79 | ---- ^^^^^^^^^^^^^^ expected type parameter `B`, found associated type
80 | |
81 | arguments to this function are incorrect
82 |
83 = note: expected type parameter `B`
84 found associated type `<B as Add>::Output`
85 note: tuple struct defined here
86 --> $DIR/missing-bounds.rs:35:8
87 |
88 LL | struct E<B>(B);
89 | ^
90 help: consider further restricting this bound
91 |
92 LL | impl<B: Add + Add<Output = B>> Add for E<B> where <B as Add>::Output = B {
93 | +++++++++++++++++
94
95 error: aborting due to 5 previous errors
96
97 Some errors have detailed explanations: E0308, E0369.
98 For more information about an error, try `rustc --explain E0308`.