2022-11-11 17:36:16 +00:00
|
|
|
struct S;
|
|
|
|
|
|
|
|
trait Foo {
|
|
|
|
fn bar<T>() -> impl Sized;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Foo for S {
|
|
|
|
fn bar() -> impl Sized {}
|
2024-08-10 00:54:16 +00:00
|
|
|
//~^ ERROR associated function `bar` has 0 type parameters but its trait declaration has 1 type parameter
|
2022-11-11 17:36:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
S::bar();
|
|
|
|
}
|