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