]>
Commit | Line | Data |
---|---|---|
6a06907d | 1 | warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes |
cdc7bbd5 | 2 | --> $DIR/issue-55872-1.rs:3:32 |
6a06907d XL |
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 | ||
1b1a35ee | 10 | error[E0276]: impl has stricter requirements than trait |
cdc7bbd5 | 11 | --> $DIR/issue-55872-1.rs:17:5 |
1b1a35ee XL |
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)` | |
cdc7bbd5 | 20 | --> $DIR/issue-55872-1.rs:13:14 |
416331ca XL |
21 | | |
22 | LL | type E = impl Copy; | |
1b1a35ee | 23 | | ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `S` |
416331ca | 24 | | |
416331ca | 25 | = note: required because it appears within the type `(S, T)` |
ba9703b0 XL |
26 | help: consider further restricting this bound |
27 | | | |
cdc7bbd5 XL |
28 | LL | impl<S: Default + std::marker::Copy> Bar for S { |
29 | | ^^^^^^^^^^^^^^^^^^^ | |
416331ca | 30 | |
1b1a35ee | 31 | error[E0277]: the trait bound `T: Copy` is not satisfied in `(S, T)` |
cdc7bbd5 | 32 | --> $DIR/issue-55872-1.rs:13:14 |
416331ca XL |
33 | | |
34 | LL | type E = impl Copy; | |
1b1a35ee | 35 | | ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `T` |
416331ca | 36 | | |
416331ca | 37 | = note: required because it appears within the type `(S, T)` |
ba9703b0 XL |
38 | help: consider further restricting this bound |
39 | | | |
cdc7bbd5 XL |
40 | LL | fn foo<T: Default + std::marker::Copy>() -> Self::E { |
41 | | ^^^^^^^^^^^^^^^^^^^ | |
416331ca XL |
42 | |
43 | error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias | |
cdc7bbd5 | 44 | --> $DIR/issue-55872-1.rs:17:37 |
416331ca XL |
45 | | |
46 | LL | fn foo<T: Default>() -> Self::E { | |
47 | | _____________________________________^ | |
48 | LL | | | |
1b1a35ee | 49 | LL | | |
416331ca XL |
50 | LL | | (S::default(), T::default()) |
51 | LL | | } | |
52 | | |_____^ | |
53 | ||
6a06907d | 54 | error: aborting due to 4 previous errors; 1 warning emitted |
416331ca | 55 | |
1b1a35ee XL |
56 | Some errors have detailed explanations: E0276, E0277. |
57 | For more information about an error, try `rustc --explain E0276`. |