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
| | trait alias used in trait object type (additional use)
5
+
| -------- ^^^^^^^^ additional non-auto trait
6
+
| |
9
7
| first non-auto trait
10
-
| trait alias used in trait object type (first use)
8
+
|
9
+
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: std::ops::Add<Rhs> + std::ops::Sub<Rhs> + X<Rhs> + Y<Rhs> {}`
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
12
error[E0191]: the value of the associated types `A` (from trait `Y`), `Output` (from trait `std::ops::Add`), `Output` (from trait `std::ops::Mul`), `Output` (from trait `std::ops::Sub`) must be specified
13
13
--> $DIR/missing-associated-types.rs:12:21
@@ -31,12 +31,12 @@ error[E0225]: only auto traits can be used as additional traits in a trait objec
| | trait alias used in trait object type (additional use)
34
+
| -------- ^^^^^^^^ additional non-auto trait
35
+
| |
38
36
| first non-auto trait
39
-
| trait alias used in trait object type (first use)
37
+
|
38
+
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: std::ops::Add<Rhs> + std::ops::Sub<Rhs> + X<Rhs> + Z<Rhs> {}`
39
+
= 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
40
41
41
error[E0191]: the value of the associated types `A` (from trait `Z`), `B` (from trait `Z`), `Output` (from trait `std::ops::Add`), `Output` (from trait `std::ops::Div`), `Output` (from trait `std::ops::Div`), `Output` (from trait `std::ops::Mul`), `Output` (from trait `std::ops::Sub`) must be specified
42
42
--> $DIR/missing-associated-types.rs:15:21
@@ -67,12 +67,12 @@ error[E0225]: only auto traits can be used as additional traits in a trait objec
| | trait alias used in trait object type (additional use)
70
+
| -------- ^^^^^^^^ additional non-auto trait
71
+
| |
74
72
| first non-auto trait
75
-
| trait alias used in trait object type (first use)
73
+
|
74
+
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: std::ops::Add<Rhs> + std::ops::Sub<Rhs> + Y<Rhs> {}`
75
+
= 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
76
77
77
error[E0191]: the value of the associated types `A` (from trait `Y`), `Output` (from trait `std::ops::Add`), `Output` (from trait `std::ops::Sub`) must be specified
78
78
--> $DIR/missing-associated-types.rs:18:21
@@ -95,12 +95,12 @@ error[E0225]: only auto traits can be used as additional traits in a trait objec
| | trait alias used in trait object type (additional use)
98
+
| -------- ^^^^^^^^ additional non-auto trait
99
+
| |
102
100
| first non-auto trait
103
-
| trait alias used in trait object type (first use)
101
+
|
102
+
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: std::ops::Add<Rhs> + std::ops::Sub<Rhs> + Fine<Rhs> {}`
103
+
= 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
104
105
105
error[E0191]: the value of the associated types `Output` (from trait `std::ops::Add`), `Output` (from trait `std::ops::Sub`) must be specified
Copy file name to clipboardExpand all lines: src/test/ui/bad/bad-sized.stderr
+5-5
Original file line number
Diff line number
Diff line change
@@ -2,12 +2,12 @@ error[E0225]: only auto traits can be used as additional traits in a trait objec
2
2
--> $DIR/bad-sized.rs:4:28
3
3
|
4
4
LL | let x: Vec<dyn Trait + Sized> = Vec::new();
5
-
| ----- ^^^^^
6
-
| | |
7
-
| | additional non-auto trait
8
-
| | trait alias used in trait object type (additional use)
5
+
| ----- ^^^^^ additional non-auto trait
6
+
| |
9
7
| first non-auto trait
10
-
| trait alias used in trait object type (first use)
8
+
|
9
+
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Trait + std::marker::Sized {}`
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
12
error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
| trait alias used in trait object type (first use)
8
+
|
9
+
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: std::io::Read + std::io::Write {}`
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
12
error[E0225]: only auto traits can be used as additional traits in a trait object
13
13
--> $DIR/E0225.rs:8:20
@@ -22,6 +22,9 @@ LL | let _: Box<dyn Foo>;
22
22
| |
23
23
| trait alias used in trait object type (additional use)
24
24
| trait alias used in trait object type (first use)
25
+
|
26
+
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: std::io::Read + std::io::Write {}`
27
+
= 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>
Copy file name to clipboardExpand all lines: src/test/ui/issues/issue-22560.stderr
+5-5
Original file line number
Diff line number
Diff line change
@@ -28,12 +28,12 @@ error[E0225]: only auto traits can be used as additional traits in a trait objec
28
28
--> $DIR/issue-22560.rs:9:23
29
29
|
30
30
LL | type Test = dyn Add + Sub;
31
-
| --- ^^^
32
-
| | |
33
-
| | additional non-auto trait
34
-
| | trait alias used in trait object type (additional use)
31
+
| --- ^^^ additional non-auto trait
32
+
| |
35
33
| first non-auto trait
36
-
| trait alias used in trait object type (first use)
34
+
|
35
+
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Add<[type error]> + Sub<[type error]> {}`
36
+
= 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>
37
37
38
38
error[E0191]: the value of the associated types `Output` (from trait `Add`), `Output` (from trait `Sub`) must be specified
Copy file name to clipboardExpand all lines: src/test/ui/issues/issue-32963.stderr
+10-10
Original file line number
Diff line number
Diff line change
@@ -2,23 +2,23 @@ error[E0225]: only auto traits can be used as additional traits in a trait objec
2
2
--> $DIR/issue-32963.rs:8:31
3
3
|
4
4
LL | size_of_copy::<dyn Misc + Copy>();
5
-
| ---- ^^^^
6
-
| | |
7
-
| | additional non-auto trait
8
-
| | trait alias used in trait object type (additional use)
5
+
| ---- ^^^^ additional non-auto trait
6
+
| |
9
7
| first non-auto trait
10
-
| trait alias used in trait object type (first use)
8
+
|
9
+
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Misc + std::marker::Copy {}`
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
12
error[E0225]: only auto traits can be used as additional traits in a trait object
13
13
--> $DIR/issue-32963.rs:8:31
14
14
|
15
15
LL | size_of_copy::<dyn Misc + Copy>();
16
-
| ---- ^^^^
17
-
| | |
18
-
| | additional non-auto trait
19
-
| | trait alias used in trait object type (additional use)
16
+
| ---- ^^^^ additional non-auto trait
17
+
| |
20
18
| first non-auto trait
21
-
| trait alias used in trait object type (first use)
19
+
|
20
+
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Misc + std::marker::Copy {}`
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>
22
22
23
23
error[E0277]: the trait bound `dyn Misc: std::marker::Copy` is not satisfied
| trait alias used in trait object type (first use)
46
+
|
47
+
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + for<'a> Trait<'a> {}`
48
+
= 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>
49
49
50
50
error[E0225]: only auto traits can be used as additional traits in a trait object
51
51
--> $DIR/trait-object-trait-parens.rs:12:49
52
52
|
53
53
LL | let _: Box<(?Sized) + (for<'a> Trait<'a>) + (Obj)>;
54
-
| ------------------- ^^^^^
55
-
| | |
56
-
| | additional non-auto trait
57
-
| | trait alias used in trait object type (additional use)
| trait alias used in trait object type (first use)
57
+
|
58
+
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: for<'a> Trait<'a> + Obj {}`
59
+
= 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>
60
60
61
61
error[E0225]: only auto traits can be used as additional traits in a trait object
62
62
--> $DIR/trait-object-trait-parens.rs:16:38
63
63
|
64
64
LL | let _: Box<(for<'a> Trait<'a>) + (Obj) + (?Sized)>;
65
-
| ----------------- ^^^^^
66
-
| | |
67
-
| | additional non-auto trait
68
-
| | trait alias used in trait object type (additional use)
| trait alias used in trait object type (first use)
68
+
|
69
+
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: for<'a> Trait<'a> + Obj {}`
70
+
= 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>
71
71
72
72
error: aborting due to 6 previous errors; 3 warnings emitted
0 commit comments