fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
1.6 KiB38 linesraw
1error[E0277]: the trait bound `U: std::marker::Copy` is not satisfied
2  --> $DIR/wf-fn-where-clause.rs:8:24
3   |
4LL | trait ExtraCopy<T:Copy> { }
5   |                   ---- required by this bound in `ExtraCopy`
6LL | 
7LL | fn foo<T,U>() where T: ExtraCopy<U>
8   |                        ^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `U`
9   |
10help: consider further restricting type parameter `U`
11   |
12LL | fn foo<T,U>() where T: ExtraCopy<U>, U: std::marker::Copy
13   |                                    ^^^^^^^^^^^^^^^^^^^^^^
14
15error[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   |
18LL | fn bar() where Vec<dyn Copy>:, {}
19   |                ^^^^^^^^^^^^^ doesn't have a size known at compile-time
20...
21LL | 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
27error[E0038]: the trait `std::marker::Copy` cannot be made into an object
28  --> $DIR/wf-fn-where-clause.rs:12:16
29   |
30LL | fn bar() where Vec<dyn Copy>:, {}
31   |                ^^^^^^^^^^^^^ the trait `std::marker::Copy` cannot be made into an object
32   |
33   = note: the trait cannot be made into an object because it requires `Self: Sized`
34
35error: aborting due to 3 previous errors
36
37Some errors have detailed explanations: E0038, E0277.
38For more information about an error, try `rustc --explain E0038`.