|
1 | 1 | error[E0393]: the type parameter `Rhs` must be explicitly specified |
2 | | - --> $DIR/issue-22560.rs:6:13 |
| 2 | + --> $DIR/issue-22560.rs:9:23 |
3 | 3 | | |
4 | | -LL | Sub; |
5 | | - | ^^^ help: set the type parameter to the desired type: `Sub<Rhs>` |
6 | | - | |
7 | | - ::: $SRC_DIR/libcore/ops/arith.rs:LL:COL |
8 | | - | |
9 | | -LL | / pub trait Sub<Rhs = Self> { |
10 | | -LL | | /// The resulting type after applying the `-` operator. |
11 | | -LL | | #[stable(feature = "rust1", since = "1.0.0")] |
| 4 | +LL | / trait Sub<Rhs=Self> { |
12 | 5 | LL | | type Output; |
13 | | -... | |
14 | | -LL | | fn sub(self, rhs: Rhs) -> Self::Output; |
15 | 6 | LL | | } |
16 | 7 | | |_- type parameter `Rhs` must be specified for this |
| 8 | +LL | |
| 9 | +LL | type Test = dyn Add + Sub; |
| 10 | + | ^^^ help: set the type parameter to the desired type: `Sub<Rhs>` |
17 | 11 | | |
18 | 12 | = note: because of the default `Self` reference, type parameters must be specified on object types |
19 | 13 |
|
20 | 14 | error[E0393]: the type parameter `Rhs` must be explicitly specified |
21 | | - --> $DIR/issue-22560.rs:3:17 |
22 | | - | |
23 | | -LL | type Test = dyn Add + |
24 | | - | ^^^ help: set the type parameter to the desired type: `Add<Rhs>` |
25 | | - | |
26 | | - ::: $SRC_DIR/libcore/ops/arith.rs:LL:COL |
| 15 | + --> $DIR/issue-22560.rs:9:17 |
27 | 16 | | |
28 | | -LL | / pub trait Add<Rhs = Self> { |
29 | | -LL | | /// The resulting type after applying the `+` operator. |
30 | | -LL | | #[stable(feature = "rust1", since = "1.0.0")] |
| 17 | +LL | / trait Add<Rhs=Self> { |
31 | 18 | LL | | type Output; |
32 | | -... | |
33 | | -LL | | fn add(self, rhs: Rhs) -> Self::Output; |
34 | 19 | LL | | } |
35 | 20 | | |_- type parameter `Rhs` must be specified for this |
| 21 | +... |
| 22 | +LL | type Test = dyn Add + Sub; |
| 23 | + | ^^^ help: set the type parameter to the desired type: `Add<Rhs>` |
36 | 24 | | |
37 | 25 | = note: because of the default `Self` reference, type parameters must be specified on object types |
38 | 26 |
|
39 | 27 | error[E0225]: only auto traits can be used as additional traits in a trait object |
40 | | - --> $DIR/issue-22560.rs:6:13 |
| 28 | + --> $DIR/issue-22560.rs:9:23 |
41 | 29 | | |
42 | | -LL | type Test = dyn Add + |
43 | | - | --- |
44 | | - | | |
| 30 | +LL | type Test = dyn Add + Sub; |
| 31 | + | --- ^^^ |
| 32 | + | | | |
| 33 | + | | additional non-auto trait |
| 34 | + | | trait alias used in trait object type (additional use) |
45 | 35 | | first non-auto trait |
46 | 36 | | trait alias used in trait object type (first use) |
47 | | -... |
48 | | -LL | Sub; |
49 | | - | ^^^ |
50 | | - | | |
51 | | - | additional non-auto trait |
52 | | - | trait alias used in trait object type (additional use) |
53 | 37 |
|
54 | | -error[E0191]: the value of the associated types `Output` (from trait `std::ops::Add`), `Output` (from trait `std::ops::Sub`) must be specified |
55 | | - --> $DIR/issue-22560.rs:3:13 |
| 38 | +error[E0191]: the value of the associated types `Output` (from trait `Add`), `Output` (from trait `Sub`) must be specified |
| 39 | + --> $DIR/issue-22560.rs:9:13 |
56 | 40 | | |
57 | | -LL | type Test = dyn Add + |
58 | | - | _____________^ |
59 | | -LL | | |
60 | | -LL | | |
61 | | -LL | | Sub; |
62 | | - | |_______________^ associated types `Output`, `Output` must be specified |
| 41 | +LL | type Output; |
| 42 | + | ------------ `Output` defined here |
| 43 | +... |
| 44 | +LL | type Output; |
| 45 | + | ------------ `Output` defined here |
| 46 | +... |
| 47 | +LL | type Test = dyn Add + Sub; |
| 48 | + | ^^^^^^^^^^^^^ associated types `Output`, `Output` must be specified |
63 | 49 |
|
64 | 50 | error: aborting due to 4 previous errors |
65 | 51 |
|
|
0 commit comments