]> git.proxmox.com Git - rustc.git/blame - src/test/ui/generic-associated-types/missing-bounds.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / generic-associated-types / missing-bounds.stderr
CommitLineData
a2a8927a 1error: equality constraints are not yet supported in `where` clauses
04454e1e 2 --> $DIR/missing-bounds.rs:35:33
a2a8927a
XL
3 |
4LL | 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
8help: if `Output` is an associated type you're trying to set, use the associated type binding syntax
9 |
10LL | impl<B: Add> Add for E<B> where B: Add<Output = B> {
11 | ~~~~~~~~~~~~~~~~~~
12
f9f354fc 13error[E0308]: mismatched types
04454e1e 14 --> $DIR/missing-bounds.rs:9:11
f9f354fc
XL
15 |
16LL | impl<B> Add for A<B> where B: Add {
17 | - this type parameter
18...
19LL | 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
26note: tuple struct defined here
27 --> $DIR/missing-bounds.rs:3:8
28 |
29LL | struct A<B>(B);
30 | ^
f9f354fc
XL
31help: consider further restricting this bound
32 |
1b1a35ee 33LL | impl<B> Add for A<B> where B: Add + Add<Output = B> {
94222f64 34 | +++++++++++++++++
f9f354fc
XL
35
36error[E0308]: mismatched types
04454e1e 37 --> $DIR/missing-bounds.rs:19:14
f9f354fc
XL
38 |
39LL | impl<B: Add> Add for C<B> {
40 | - this type parameter
41...
42LL | 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
49note: tuple struct defined here
50 --> $DIR/missing-bounds.rs:13:8
51 |
52LL | struct C<B>(B);
53 | ^
f9f354fc
XL
54help: consider further restricting this bound
55 |
1b1a35ee 56LL | impl<B: Add + Add<Output = B>> Add for C<B> {
94222f64 57 | +++++++++++++++++
f9f354fc
XL
58
59error[E0369]: cannot add `B` to `B`
04454e1e 60 --> $DIR/missing-bounds.rs:29:21
f9f354fc
XL
61 |
62LL | Self(self.0 + rhs.0)
63 | ------ ^ ----- B
64 | |
65 | B
66 |
67help: consider restricting type parameter `B`
68 |
04454e1e
FG
69LL | impl<B: std::ops::Add> Add for D<B> {
70 | +++++++++++++++
f9f354fc 71
a2a8927a 72error[E0308]: mismatched types
04454e1e 73 --> $DIR/missing-bounds.rs:40:14
a2a8927a
XL
74 |
75LL | impl<B: Add> Add for E<B> where <B as Add>::Output = B {
76 | - this type parameter
77...
78LL | 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
85note: tuple struct defined here
86 --> $DIR/missing-bounds.rs:33:8
87 |
88LL | struct E<B>(B);
89 | ^
04454e1e 90help: consider further restricting this bound
a2a8927a 91 |
04454e1e
FG
92LL | impl<B: Add + Add<Output = B>> Add for E<B> where <B as Add>::Output = B {
93 | +++++++++++++++++
a2a8927a
XL
94
95error: aborting due to 5 previous errors
f9f354fc
XL
96
97Some errors have detailed explanations: E0308, E0369.
98For more information about an error, try `rustc --explain E0308`.