You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/ui/associated-types/issue-22560.stderr
+2-52
Original file line number
Diff line number
Diff line change
@@ -9,56 +9,6 @@ LL | type Test = dyn Add + Sub;
9
9
= help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Add + Sub {}`
10
10
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
11
11
12
-
error[E0191]: the value of the associated types `Output` in `Add`, `Output` in `Sub` must be specified
13
-
--> $DIR/issue-22560.rs:9:17
14
-
|
15
-
LL | type Output;
16
-
| ----------- `Output` defined here
17
-
...
18
-
LL | type Output;
19
-
| ----------- `Output` defined here
20
-
...
21
-
LL | type Test = dyn Add + Sub;
22
-
| ^^^ ^^^ associated type `Output` must be specified
23
-
| |
24
-
| associated type `Output` must be specified
25
-
|
26
-
help: specify the associated types
27
-
|
28
-
LL | type Test = dyn Add<Output = Type> + Sub<Output = Type>;
29
-
| ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
30
-
31
-
error[E0393]: the type parameter `Rhs` must be explicitly specified
32
-
--> $DIR/issue-22560.rs:9:17
33
-
|
34
-
LL | trait Add<Rhs=Self> {
35
-
| ------------------- type parameter `Rhs` must be specified for this
36
-
...
37
-
LL | type Test = dyn Add + Sub;
38
-
| ^^^
39
-
|
40
-
= note: because of the default `Self` reference, type parameters must be specified on object types
41
-
help: set the type parameter to the desired type
42
-
|
43
-
LL | type Test = dyn Add<Rhs> + Sub;
44
-
| +++++
45
-
46
-
error[E0393]: the type parameter `Rhs` must be explicitly specified
47
-
--> $DIR/issue-22560.rs:9:23
48
-
|
49
-
LL | trait Sub<Rhs=Self> {
50
-
| ------------------- type parameter `Rhs` must be specified for this
51
-
...
52
-
LL | type Test = dyn Add + Sub;
53
-
| ^^^
54
-
|
55
-
= note: because of the default `Self` reference, type parameters must be specified on object types
56
-
help: set the type parameter to the desired type
57
-
|
58
-
LL | type Test = dyn Add + Sub<Rhs>;
59
-
| +++++
60
-
61
-
error: aborting due to 4 previous errors
12
+
error: aborting due to 1 previous error
62
13
63
-
Some errors have detailed explanations: E0191, E0225, E0393.
64
-
For more information about an error, try `rustc --explain E0191`.
14
+
For more information about this error, try `rustc --explain E0225`.
= help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + X<Rhs> + Y<Rhs> {}`
10
10
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
11
11
12
-
error[E0191]: the value of the associated types `A` in `Y`, `Output` in `Add`, `Output` in `Mul`, `Output` in `Sub` must be specified
= help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + X<Rhs> + Z<Rhs> {}`
39
21
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
40
22
41
-
error[E0191]: the value of the associated types `A` and `B` in `Z`, `Output` and `Output` in `Div`, `Output` in `Add`, `Output` in `Mul`, `Output` in `Sub` must be specified
= help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + Y<Rhs> {}`
75
32
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
76
33
77
-
error[E0191]: the value of the associated types `A` in `Y`, `Output` in `Add`, `Output` in `Sub` must be specified
= help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + Fine<Rhs> {}`
103
43
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
104
44
105
-
error[E0191]: the value of the associated types `Output` in `Add`, `Output` in `Sub` must be specified
= help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Trait + Sized {}`
10
10
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
11
11
12
-
error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
13
-
--> $DIR/bad-sized.rs:4:12
14
-
|
15
-
LL | let x: Vec<dyn Trait + Sized> = Vec::new();
16
-
| ^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
17
-
|
18
-
= help: the trait `Sized` is not implemented for `dyn Trait`
19
-
note: required by an implicit `Sized` bound in `Vec`
20
-
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
21
-
22
-
error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
23
-
--> $DIR/bad-sized.rs:4:37
24
-
|
25
-
LL | let x: Vec<dyn Trait + Sized> = Vec::new();
26
-
| ^^^^^^^^^^ doesn't have a size known at compile-time
27
-
|
28
-
= help: the trait `Sized` is not implemented for `dyn Trait`
29
-
note: required by a bound in `Vec::<T>::new`
30
-
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
31
-
32
-
error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
33
-
--> $DIR/bad-sized.rs:4:37
34
-
|
35
-
LL | let x: Vec<dyn Trait + Sized> = Vec::new();
36
-
| ^^^ doesn't have a size known at compile-time
37
-
|
38
-
= help: the trait `Sized` is not implemented for `dyn Trait`
39
-
note: required by an implicit `Sized` bound in `Vec`
40
-
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
41
-
42
-
error: aborting due to 4 previous errors
12
+
error: aborting due to 1 previous error
43
13
44
-
Some errors have detailed explanations: E0225, E0277.
45
-
For more information about an error, try `rustc --explain E0225`.
14
+
For more information about this error, try `rustc --explain E0225`.
= help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Misc + Copy {}`
10
10
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
11
11
12
-
error[E0277]: the trait bound `dyn Misc: Copy` is not satisfied
13
-
--> $DIR/issue-32963.rs:8:20
14
-
|
15
-
LL | size_of_copy::<dyn Misc + Copy>();
16
-
| ^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `dyn Misc`
0 commit comments