]> git.proxmox.com Git - rustc.git/blame - src/test/ui/impl-trait/issue-55872-1.full_tait.stderr
New upstream version 1.53.0+dfsg1
[rustc.git] / src / test / ui / impl-trait / issue-55872-1.full_tait.stderr
CommitLineData
6a06907d 1warning: 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 |
4LL | #![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 10error[E0276]: impl has stricter requirements than trait
cdc7bbd5 11 --> $DIR/issue-55872-1.rs:17:5
1b1a35ee
XL
12 |
13LL | fn foo<T>() -> Self::E;
14 | ----------------------- definition of `foo` from trait
15...
16LL | fn foo<T: Default>() -> Self::E {
17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: Default`
18
19error[E0277]: the trait bound `S: Copy` is not satisfied in `(S, T)`
cdc7bbd5 20 --> $DIR/issue-55872-1.rs:13:14
416331ca
XL
21 |
22LL | 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
26help: consider further restricting this bound
27 |
cdc7bbd5
XL
28LL | impl<S: Default + std::marker::Copy> Bar for S {
29 | ^^^^^^^^^^^^^^^^^^^
416331ca 30
1b1a35ee 31error[E0277]: the trait bound `T: Copy` is not satisfied in `(S, T)`
cdc7bbd5 32 --> $DIR/issue-55872-1.rs:13:14
416331ca
XL
33 |
34LL | 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
38help: consider further restricting this bound
39 |
cdc7bbd5
XL
40LL | fn foo<T: Default + std::marker::Copy>() -> Self::E {
41 | ^^^^^^^^^^^^^^^^^^^
416331ca
XL
42
43error: 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 |
46LL | fn foo<T: Default>() -> Self::E {
47 | _____________________________________^
48LL | |
1b1a35ee 49LL | |
416331ca
XL
50LL | | (S::default(), T::default())
51LL | | }
52 | |_____^
53
6a06907d 54error: aborting due to 4 previous errors; 1 warning emitted
416331ca 55
1b1a35ee
XL
56Some errors have detailed explanations: E0276, E0277.
57For more information about an error, try `rustc --explain E0276`.