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
= 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[E0225]: only auto traits can be used as additional traits in a trait object
13
-
--> $DIR/issue-32963.rs:8:31
14
-
|
15
-
LL | size_of_copy::<dyn Misc + Copy>();
16
-
| ---- ^^^^ additional non-auto trait
17
-
| |
18
-
| first non-auto trait
19
-
|
20
-
= help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Misc + 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
-
23
12
error[E0277]: the trait bound `dyn Misc: Copy` is not satisfied
24
-
--> $DIR/issue-32963.rs:8:5
13
+
--> $DIR/issue-32963.rs:8:20
25
14
|
26
15
LL | size_of_copy::<dyn Misc + Copy>();
27
-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `dyn Misc`
16
+
| ^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `dyn Misc`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Eq<dyn Foo<(isize,), Output = ()>>` is not implemented for `dyn Foo<(isize,), isize, Output = ()>`
5
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Eq<dyn Foo<(isize,), Output = ()>>` is not implemented for `dyn Foo<(isize,), isize, Output = ()>`
Copy file name to clipboardExpand all lines: src/test/ui/unboxed-closures/unboxed-closure-sugar-equiv.stderr
+3-4
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,8 @@
1
1
error[E0277]: the trait bound `dyn Foo<(char,), Output = ()>: Eq<dyn Foo<(), Output = ()>>` is not satisfied
2
-
--> $DIR/unboxed-closure-sugar-equiv.rs:43:5
2
+
--> $DIR/unboxed-closure-sugar-equiv.rs:44:11
3
3
|
4
-
LL | / eq::< dyn Foo<(),Output=()>,
5
-
LL | | dyn Foo(char) >();
6
-
| |_______________________________________________________________________^ the trait `Eq<dyn Foo<(), Output = ()>>` is not implemented for `dyn Foo<(char,), Output = ()>`
4
+
LL | dyn Foo(char) >();
5
+
| ^^^^^^^^^^^^^ the trait `Eq<dyn Foo<(), Output = ()>>` is not implemented for `dyn Foo<(char,), Output = ()>`
0 commit comments