diff options
Diffstat (limited to 'tests/ui/impl-trait/extra-impl-in-trait-impl.fixed')
-rw-r--r-- | tests/ui/impl-trait/extra-impl-in-trait-impl.fixed | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/extra-impl-in-trait-impl.fixed b/tests/ui/impl-trait/extra-impl-in-trait-impl.fixed new file mode 100644 index 000000000..cd4f2610d --- /dev/null +++ b/tests/ui/impl-trait/extra-impl-in-trait-impl.fixed @@ -0,0 +1,19 @@ +// run-rustfix + +struct S<T>(T); +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() {} |