rust/tests/ui/impl-trait/extra-impl-in-trait-impl.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
368 B
Rust
Raw Normal View History

// run-rustfix
struct S<T>(T);
struct S2;
impl<T: Default> impl Default for S<T> {
//~^ ERROR: unexpected `impl` keyword
//~| HELP: remove the extra `impl`
fn default() -> Self { todo!() }
}
impl impl Default for S2 {
//~^ ERROR: unexpected `impl` keyword
//~| HELP: remove the extra `impl`
fn default() -> Self { todo!() }
}
fn main() {}