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
error: the type `<dyn Setup<From = T> as Setup>::From` is not well-formed
34
+
error[E0277]: the trait bound `T: Copy` is not satisfied in `dyn Setup<From = T>`
41
35
--> $DIR/object-unsafety.rs:12:5
42
36
|
43
37
LL | copy::<dyn Setup<From=T>>(t)
44
-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `dyn Setup<From = T>`, the trait `Copy` is not implemented for `T`, which is required by `dyn Setup<From = T>: Setup`
39
+
|
40
+
= note: required because it appears within the type `dyn Setup<From = T>`
41
+
help: consider restricting type parameter `T`
42
+
|
43
+
LL | pub fn copy_any<T: std::marker::Copy>(t: &T) -> T {
44
+
| +++++++++++++++++++
45
45
46
-
error: aborting due to 4 previous errors
46
+
error: aborting due to 3 previous errors
47
47
48
48
Some errors have detailed explanations: E0277, E0308.
49
49
For more information about an error, try `rustc --explain E0277`.
0 commit comments