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