]> git.proxmox.com Git - rustc.git/blob - src/test/ui/impl-trait/issue-55872-1.full_tait.stderr
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / ui / impl-trait / issue-55872-1.full_tait.stderr
1 warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
2 --> $DIR/issue-55872-1.rs:4:32
3 |
4 LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
5 | ^^^^^^^^^^^^^^^^^^^^^
6 |
7 = note: `#[warn(incomplete_features)]` on by default
8 = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
9
10 error[E0276]: impl has stricter requirements than trait
11 --> $DIR/issue-55872-1.rs:18:5
12 |
13 LL | fn foo<T>() -> Self::E;
14 | ----------------------- definition of `foo` from trait
15 ...
16 LL | fn foo<T: Default>() -> Self::E {
17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: Default`
18
19 error[E0277]: the trait bound `S: Copy` is not satisfied in `(S, T)`
20 --> $DIR/issue-55872-1.rs:14:14
21 |
22 LL | type E = impl Copy;
23 | ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `S`
24 |
25 = note: required because it appears within the type `(S, T)`
26 help: consider further restricting this bound
27 |
28 LL | impl<S: Default + Copy> Bar for S {
29 | ^^^^^^
30
31 error[E0277]: the trait bound `T: Copy` is not satisfied in `(S, T)`
32 --> $DIR/issue-55872-1.rs:14:14
33 |
34 LL | type E = impl Copy;
35 | ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `T`
36 |
37 = note: required because it appears within the type `(S, T)`
38 help: consider further restricting this bound
39 |
40 LL | fn foo<T: Default + Copy>() -> Self::E {
41 | ^^^^^^
42
43 error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
44 --> $DIR/issue-55872-1.rs:18:37
45 |
46 LL | fn foo<T: Default>() -> Self::E {
47 | _____________________________________^
48 LL | |
49 LL | |
50 LL | | (S::default(), T::default())
51 LL | | }
52 | |_____^
53
54 error: aborting due to 4 previous errors; 1 warning emitted
55
56 Some errors have detailed explanations: E0276, E0277.
57 For more information about an error, try `rustc --explain E0276`.