2019-06-24 03:15:07 -05:00
|
|
|
// edition:2018
|
2019-08-01 20:45:58 -05:00
|
|
|
|
2021-07-26 15:01:16 -05:00
|
|
|
#![feature(type_alias_impl_trait)]
|
2019-06-24 03:15:07 -05:00
|
|
|
|
|
|
|
pub trait Bar {
|
2022-02-14 10:10:22 -06:00
|
|
|
type E: Send;
|
2019-06-24 03:15:07 -05:00
|
|
|
|
|
|
|
fn foo<T>() -> Self::E;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<S> Bar for S {
|
2022-02-14 10:10:22 -06:00
|
|
|
type E = impl std::marker::Send;
|
2019-06-24 03:15:07 -05:00
|
|
|
fn foo<T>() -> Self::E {
|
2022-02-11 01:18:06 -06:00
|
|
|
async {}
|
2022-02-14 10:10:22 -06:00
|
|
|
//~^ ERROR type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
|
2019-06-24 03:15:07 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|