2019-06-24 08:15:07 +00:00
|
|
|
// edition:2018
|
2019-08-02 01:45:58 +00:00
|
|
|
|
2023-04-12 13:32:15 +00:00
|
|
|
#![feature(impl_trait_in_assoc_type)]
|
2019-06-24 08:15:07 +00:00
|
|
|
|
|
|
|
pub trait Bar {
|
2022-02-14 16:10:22 +00:00
|
|
|
type E: Send;
|
2019-06-24 08:15:07 +00:00
|
|
|
|
|
|
|
fn foo<T>() -> Self::E;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<S> Bar for S {
|
2022-02-14 16:10:22 +00:00
|
|
|
type E = impl std::marker::Send;
|
2019-06-24 08:15:07 +00:00
|
|
|
fn foo<T>() -> Self::E {
|
2022-02-11 07:18:06 +00:00
|
|
|
async {}
|
2022-02-14 16:10:22 +00:00
|
|
|
//~^ ERROR type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
|
2023-06-24 10:02:54 +00: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 08:15:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|