2023-04-12 13:32:15 +00:00
|
|
|
#![feature(impl_trait_in_assoc_type)]
|
2019-06-24 09:15:07 +01:00
|
|
|
|
|
|
|
pub trait Bar {
|
|
|
|
type E: Copy;
|
|
|
|
|
|
|
|
fn foo<T>() -> Self::E;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<S> Bar for S {
|
2019-07-30 00:11:58 +01:00
|
|
|
type E = impl Copy;
|
2019-06-24 09:15:07 +01:00
|
|
|
|
|
|
|
fn foo<T>() -> Self::E {
|
2022-02-11 07:18:06 +00:00
|
|
|
|| ()
|
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
|
2019-06-24 09:15:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|