]> git.proxmox.com Git - rustc.git/blob - src/test/ui/impl-trait/issue-55872-1.stderr
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / impl-trait / issue-55872-1.stderr
1 error[E0277]: the trait bound `S: std::marker::Copy` is not satisfied in `(S, T)`
2 --> $DIR/issue-55872-1.rs:12:5
3 |
4 LL | type E = impl Copy;
5 | ^^^^^^^^^^^^^^^^^^^ within `(S, T)`, the trait `std::marker::Copy` is not implemented for `S`
6 |
7 = note: required because it appears within the type `(S, T)`
8 = note: the return type of a function must have a statically known size
9 help: consider further restricting this bound
10 |
11 LL | impl<S: Default + std::marker::Copy> Bar for S {
12 | ^^^^^^^^^^^^^^^^^^^
13
14 error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied in `(S, T)`
15 --> $DIR/issue-55872-1.rs:12:5
16 |
17 LL | type E = impl Copy;
18 | ^^^^^^^^^^^^^^^^^^^ within `(S, T)`, the trait `std::marker::Copy` is not implemented for `T`
19 |
20 = note: required because it appears within the type `(S, T)`
21 = note: the return type of a function must have a statically known size
22 help: consider further restricting this bound
23 |
24 LL | fn foo<T: Default + std::marker::Copy>() -> Self::E {
25 | ^^^^^^^^^^^^^^^^^^^
26
27 error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
28 --> $DIR/issue-55872-1.rs:16:37
29 |
30 LL | fn foo<T: Default>() -> Self::E {
31 | _____________________________________^
32 LL | |
33 LL | | (S::default(), T::default())
34 LL | | }
35 | |_____^
36
37 error: aborting due to 3 previous errors
38
39 For more information about this error, try `rustc --explain E0277`.