]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/issue-55872-2.rs
Rollup merge of #95179 - b-naber:eval-in-try-unify, r=lcnr
[rust.git] / src / test / ui / impl-trait / issue-55872-2.rs
1 // edition:2018
2
3 #![feature(type_alias_impl_trait)]
4
5 pub trait Bar {
6     type E: Copy;
7
8     fn foo<T>() -> Self::E;
9 }
10
11 impl<S> Bar for S {
12     type E = impl std::marker::Copy;
13     fn foo<T>() -> Self::E {
14         //~^ ERROR type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
15         //~| ERROR the trait bound `impl Future: Copy` is not satisfied
16         async {}
17     }
18 }
19
20 fn main() {}