rust/src/test/ui/wf/wf-fn-where-clause.stderr

37 lines
1.5 KiB
Plaintext
Raw Normal View History

2018-08-08 07:28:26 -05:00
error[E0277]: the trait bound `U: std::marker::Copy` is not satisfied
2018-12-25 09:56:47 -06:00
--> $DIR/wf-fn-where-clause.rs:8:1
2018-08-08 07:28:26 -05:00
|
LL | trait ExtraCopy<T:Copy> { }
| ----------------------- required by `ExtraCopy`
LL |
2019-10-08 13:03:35 -05:00
LL | fn foo<T,U>() where T: ExtraCopy<U>
| ^ - help: consider further restricting type parameter `U`: `, U: std::marker::Copy`
| _|
| |
2018-08-08 07:28:26 -05:00
LL | | {
LL | | }
| |_^ the trait `std::marker::Copy` is not implemented for `U`
error[E0277]: the size for values of type `(dyn std::marker::Copy + 'static)` cannot be known at compilation time
2018-12-25 09:56:47 -06:00
--> $DIR/wf-fn-where-clause.rs:12:1
|
LL | fn bar() where Vec<dyn Copy>:, {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `std::marker::Sized` is not implemented for `(dyn std::marker::Copy + 'static)`
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
= note: required by `std::vec::Vec`
error[E0038]: the trait `std::marker::Copy` cannot be made into an object
2018-12-25 09:56:47 -06:00
--> $DIR/wf-fn-where-clause.rs:12:1
|
LL | fn bar() where Vec<dyn Copy>:, {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` cannot be made into an object
|
= note: the trait cannot require that `Self : Sized`
error: aborting due to 3 previous errors
2018-08-08 07:28:26 -05:00
Some errors have detailed explanations: E0038, E0277.
For more information about an error, try `rustc --explain E0038`.