2019-06-24 10:15:07 +02:00
|
|
|
// ignore-tidy-linelength
|
2019-07-30 01:11:58 +02:00
|
|
|
#![feature(type_alias_impl_trait)]
|
2019-06-24 10:15:07 +02:00
|
|
|
|
|
|
|
pub trait Bar {
|
|
|
|
type E: Copy;
|
|
|
|
|
|
|
|
fn foo<T>() -> Self::E;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<S> Bar for S {
|
2019-07-30 01:11:58 +02:00
|
|
|
type E = impl Copy;
|
2019-06-24 10:15:07 +02:00
|
|
|
|
|
|
|
fn foo<T>() -> Self::E {
|
|
|
|
//~^ ERROR type parameter `T` is part of concrete type but not used in parameter list for existential type
|
|
|
|
|| ()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|