mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-12 16:45:37 +00:00
22 lines
399 B
Rust
22 lines
399 B
Rust
//@ run-rustfix
|
|
|
|
#[allow(dead_code)]
|
|
struct S<T>(T);
|
|
#[allow(dead_code)]
|
|
struct S2;
|
|
|
|
impl<T: Default> Default for S<T> {
|
|
//~^ ERROR: unexpected `impl` keyword
|
|
//~| HELP: remove the extra `impl`
|
|
fn default() -> Self { todo!() }
|
|
}
|
|
|
|
impl Default for S2 {
|
|
//~^ ERROR: unexpected `impl` keyword
|
|
//~| HELP: remove the extra `impl`
|
|
fn default() -> Self { todo!() }
|
|
}
|
|
|
|
|
|
fn main() {}
|