fork/rust

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

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
1.6 KiB37 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 `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 restricting this type parameter with `where U: std::marker::Copy`
11  --> $DIR/wf-fn-where-clause.rs:8:10
12   |
13LL | fn foo<T,U>() where T: ExtraCopy<U>
14   |          ^
15
16error[E0277]: the size for values of type `(dyn std::marker::Copy + 'static)` cannot be known at compilation time
17  --> $DIR/wf-fn-where-clause.rs:12:16
18   |
19LL | fn bar() where Vec<dyn Copy>:, {}
20   |                ^^^^^^^^^^^^^ doesn't have a size known at compile-time
21   |
22   = help: the trait `std::marker::Sized` is not implemented for `(dyn std::marker::Copy + 'static)`
23   = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
24   = note: required by `std::vec::Vec`
25
26error[E0038]: the trait `std::marker::Copy` cannot be made into an object
27  --> $DIR/wf-fn-where-clause.rs:12:16
28   |
29LL | fn bar() where Vec<dyn Copy>:, {}
30   |                ^^^^^^^^^^^^^ the trait `std::marker::Copy` cannot be made into an object
31   |
32   = note: the trait cannot be made into an object because it requires `Self: Sized`
33
34error: aborting due to 3 previous errors
35
36Some errors have detailed explanations: E0038, E0277.
37For more information about an error, try `rustc --explain E0038`.