]> git.lizzy.rs Git - rust.git/blob - src/test/ui/wf/wf-fn-where-clause.stderr
f17391520a32cc80cb174af391dc9b0d3f66ea16
[rust.git] / src / test / ui / wf / wf-fn-where-clause.stderr
1 error[E0277]: the trait bound `U: std::marker::Copy` is not satisfied
2   --> $DIR/wf-fn-where-clause.rs:8:24
3    |
4 LL | trait ExtraCopy<T:Copy> { }
5    | ----------------------- required by `ExtraCopy`
6 LL | 
7 LL | fn foo<T,U>() where T: ExtraCopy<U>
8    |                        ^^^^^^^^^^^^- help: consider further restricting type parameter `U`: `, U: std::marker::Copy`
9    |                        |
10    |                        the trait `std::marker::Copy` is not implemented for `U`
11
12 error[E0277]: the size for values of type `(dyn std::marker::Copy + 'static)` cannot be known at compilation time
13   --> $DIR/wf-fn-where-clause.rs:12:16
14    |
15 LL | fn bar() where Vec<dyn Copy>:, {}
16    |                ^^^^^^^^^^^^^ doesn't have a size known at compile-time
17    |
18    = help: the trait `std::marker::Sized` is not implemented for `(dyn std::marker::Copy + 'static)`
19    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
20    = note: required by `std::vec::Vec`
21
22 error[E0038]: the trait `std::marker::Copy` cannot be made into an object
23   --> $DIR/wf-fn-where-clause.rs:12:16
24    |
25 LL | fn bar() where Vec<dyn Copy>:, {}
26    |                ^^^^^^^^^^^^^ the trait `std::marker::Copy` cannot be made into an object
27    |
28    = note: traits that require `Self: Sized` cannot be made into an object
29
30 error: aborting due to 3 previous errors
31
32 Some errors have detailed explanations: E0038, E0277.
33 For more information about an error, try `rustc --explain E0038`.