summary refs log tree commit diff
path: root/src/test/ui/impl-trait/issue-55872-1.stderr
blob: 6cb2c9fb892f3f5a1caa5c85148f0c58a323d1c3 (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
38
39
error[E0277]: the trait bound `S: std::marker::Copy` is not satisfied in `(S, T)`
  --> $DIR/issue-55872-1.rs:12:5
   |
LL |     type E = impl Copy;
   |     ^^^^^^^^^^^^^^^^^^^ within `(S, T)`, the trait `std::marker::Copy` is not implemented for `S`
   |
   = note: required because it appears within the type `(S, T)`
   = note: the return type of a function must have a statically known size
help: consider further restricting this bound
   |
LL | impl<S: Default + std::marker::Copy> Bar for S {
   |                 ^^^^^^^^^^^^^^^^^^^

error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied in `(S, T)`
  --> $DIR/issue-55872-1.rs:12:5
   |
LL |     type E = impl Copy;
   |     ^^^^^^^^^^^^^^^^^^^ within `(S, T)`, the trait `std::marker::Copy` is not implemented for `T`
   |
   = note: required because it appears within the type `(S, T)`
   = note: the return type of a function must have a statically known size
help: consider further restricting this bound
   |
LL |     fn foo<T: Default + std::marker::Copy>() -> Self::E {
   |                       ^^^^^^^^^^^^^^^^^^^

error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
  --> $DIR/issue-55872-1.rs:16:37
   |
LL |       fn foo<T: Default>() -> Self::E {
   |  _____________________________________^
LL | |
LL | |         (S::default(), T::default())
LL | |     }
   | |_____^

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0277`.