]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-22560.stderr
Tweak errors for missing associated types and type parameters
[rust.git] / src / test / ui / issues / issue-22560.stderr
1 error[E0393]: the type parameter `Rhs` must be explicitly specified
2   --> $DIR/issue-22560.rs:6:13
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")]
12 LL | |     type Output;
13 ...  |
14 LL | |     fn sub(self, rhs: Rhs) -> Self::Output;
15 LL | | }
16    | |_- type parameter `Rhs` must be specified for this
17    |
18    = note: because of the default `Self` reference, type parameters must be specified on object types
19
20 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
27    |
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")]
31 LL | |     type Output;
32 ...  |
33 LL | |     fn add(self, rhs: Rhs) -> Self::Output;
34 LL | | }
35    | |_- type parameter `Rhs` must be specified for this
36    |
37    = note: because of the default `Self` reference, type parameters must be specified on object types
38
39 error[E0225]: only auto traits can be used as additional traits in a trait object
40   --> $DIR/issue-22560.rs:6:13
41    |
42 LL | type Test = dyn Add +
43    |                 ---
44    |                 |
45    |                 first non-auto trait
46    |                 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
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
56    |
57 LL |   type Test = dyn Add +
58    |  _____________^
59 LL | |
60 LL | |
61 LL | |             Sub;
62    | |_______________^ associated types `Output`, `Output` must be specified
63
64 error: aborting due to 4 previous errors
65
66 Some errors have detailed explanations: E0191, E0225, E0393.
67 For more information about an error, try `rustc --explain E0191`.