]> git.proxmox.com Git - rustc.git/blob - src/test/ui/wf/wf-fn-where-clause.stderr
New upstream version 1.46.0~beta.2+dfsg1
[rustc.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 this bound in `ExtraCopy`
6 LL |
7 LL | fn foo<T,U>() where T: ExtraCopy<U>
8 | ^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `U`
9 |
10 help: consider further restricting type parameter `U`
11 |
12 LL | fn foo<T,U>() where T: ExtraCopy<U>, U: std::marker::Copy
13 | ^^^^^^^^^^^^^^^^^^^^^^
14
15 error[E0277]: the size for values of type `(dyn std::marker::Copy + 'static)` cannot be known at compilation time
16 --> $DIR/wf-fn-where-clause.rs:12:16
17 |
18 LL | fn bar() where Vec<dyn Copy>:, {}
19 | ^^^^^^^^^^^^^ doesn't have a size known at compile-time
20 ...
21 LL | struct Vec<T> {
22 | - required by this bound in `Vec`
23 |
24 = help: the trait `std::marker::Sized` is not implemented for `(dyn std::marker::Copy + 'static)`
25 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
26 help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
27 --> $DIR/wf-fn-where-clause.rs:16:12
28 |
29 LL | struct Vec<T> {
30 | ^ this could be changed to `T: ?Sized`...
31 LL | t: T,
32 | - ...if indirection was used here: `Box<T>`
33
34 error[E0038]: the trait `std::marker::Copy` cannot be made into an object
35 --> $DIR/wf-fn-where-clause.rs:12:16
36 |
37 LL | fn bar() where Vec<dyn Copy>:, {}
38 | ^^^^^^^^^^^^^ the trait `std::marker::Copy` cannot be made into an object
39 |
40 = note: the trait cannot be made into an object because it requires `Self: Sized`
41
42 error: aborting due to 3 previous errors
43
44 Some errors have detailed explanations: E0038, E0277.
45 For more information about an error, try `rustc --explain E0038`.