summary refs log tree commit diff
path: root/src/test/ui/wf/wf-fn-where-clause.stderr
blob: 21591419ec856becec482c916c136eecbfceebb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
error[E0277]: the trait bound `U: std::marker::Copy` is not satisfied
  --> $DIR/wf-fn-where-clause.rs:18:1
   |
LL | / fn foo<T,U>() where T: ExtraCopy<U> //~ ERROR E0277
LL | | {
LL | | }
   | |_^ the trait `std::marker::Copy` is not implemented for `U`
   |
   = help: consider adding a `where U: std::marker::Copy` bound
note: required by `ExtraCopy`
  --> $DIR/wf-fn-where-clause.rs:16:1
   |
LL | trait ExtraCopy<T:Copy> { }
   | ^^^^^^^^^^^^^^^^^^^^^^^

error[E0277]: the size for values of type `(dyn std::marker::Copy + 'static)` cannot be known at compilation time
  --> $DIR/wf-fn-where-clause.rs:22:1
   |
LL | fn bar() where Vec<dyn Copy>:, {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `std::marker::Sized` is not implemented for `(dyn std::marker::Copy + 'static)`
   = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
   = note: required by `std::vec::Vec`

error[E0038]: the trait `std::marker::Copy` cannot be made into an object
  --> $DIR/wf-fn-where-clause.rs:22:1
   |
LL | fn bar() where Vec<dyn Copy>:, {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` cannot be made into an object
   |
   = note: the trait cannot require that `Self : Sized`

error: aborting due to 3 previous errors

Some errors occurred: E0038, E0277.
For more information about an error, try `rustc --explain E0038`.