2018-08-08 14:28:26 +02:00
|
|
|
error[E0277]: the trait bound `U: std::marker::Copy` is not satisfied
|
2020-01-29 16:55:37 -08:00
|
|
|
--> $DIR/wf-fn-where-clause.rs:8:24
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2020-01-18 14:57:56 -08:00
|
|
|
LL | trait ExtraCopy<T:Copy> { }
|
|
|
|
| ----------------------- required by `ExtraCopy`
|
2019-08-24 14:44:43 -07:00
|
|
|
LL |
|
2020-01-18 14:57:56 -08:00
|
|
|
LL | fn foo<T,U>() where T: ExtraCopy<U>
|
2019-12-26 13:43:33 +01:00
|
|
|
| ^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `U`
|
|
|
|
|
|
2020-03-13 19:28:14 -07:00
|
|
|
help: consider further restricting type parameter `U`
|
2019-12-26 13:43:33 +01:00
|
|
|
|
|
2020-03-13 19:28:14 -07:00
|
|
|
LL | fn foo<T,U>() where T: ExtraCopy<U>, U: std::marker::Copy
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
2018-08-08 14:28:26 +02:00
|
|
|
|
2018-08-26 00:28:23 +03:00
|
|
|
error[E0277]: the size for values of type `(dyn std::marker::Copy + 'static)` cannot be known at compilation time
|
2020-01-29 16:55:37 -08:00
|
|
|
--> $DIR/wf-fn-where-clause.rs:12:16
|
2018-08-26 00:28:23 +03:00
|
|
|
|
|
|
|
|
LL | fn bar() where Vec<dyn Copy>:, {}
|
2020-01-29 16:55:37 -08:00
|
|
|
| ^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
2018-08-26 00:28:23 +03:00
|
|
|
|
|
|
|
|
= help: the trait `std::marker::Sized` is not implemented for `(dyn std::marker::Copy + 'static)`
|
2019-01-01 12:53:07 -05:00
|
|
|
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
|
2018-08-26 00:28:23 +03:00
|
|
|
= note: required by `std::vec::Vec`
|
|
|
|
|
|
|
|
error[E0038]: the trait `std::marker::Copy` cannot be made into an object
|
2020-01-29 16:55:37 -08:00
|
|
|
--> $DIR/wf-fn-where-clause.rs:12:16
|
2018-08-26 00:28:23 +03:00
|
|
|
|
|
|
|
|
LL | fn bar() where Vec<dyn Copy>:, {}
|
2020-01-29 16:55:37 -08:00
|
|
|
| ^^^^^^^^^^^^^ the trait `std::marker::Copy` cannot be made into an object
|
2018-08-26 00:28:23 +03:00
|
|
|
|
|
2020-01-31 16:47:00 -08:00
|
|
|
= note: the trait cannot be made into an object because it requires `Self: Sized`
|
2018-08-26 00:28:23 +03:00
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
2018-08-08 14:28:26 +02:00
|
|
|
|
2019-04-17 13:26:38 -04:00
|
|
|
Some errors have detailed explanations: E0038, E0277.
|
2018-08-26 00:28:23 +03:00
|
|
|
For more information about an error, try `rustc --explain E0038`.
|