mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
15 lines
227 B
Rust
15 lines
227 B
Rust
struct U;
|
|
|
|
trait Foo {
|
|
fn bar(&self) -> impl Sized;
|
|
}
|
|
|
|
impl Foo for U {
|
|
fn bar<T>(&self) {}
|
|
//~^ ERROR method `bar` has 1 type parameter but its trait declaration has 0 type parameters
|
|
}
|
|
|
|
fn main() {
|
|
U.bar();
|
|
}
|