Closed
Description
From: src/test/compile-fail/typeck-default-trait-impl-outside-crate.rs
Error E0318 needs a span label, a note, and an updated title, updating it from:
error[E0318]: cannot create default implementations for traits outside the crate they're defined in; define a new trait instead
--> src/test/compile-fail/typeck-default-trait-impl-outside-crate.rs:13:1
|
13 | impl Copy for .. {}
| ^^^^^^^^^^^^^^^^^^^
To:
error[E0318]: cannot create default implementations for traits outside the crate they're defined in
--> src/test/compile-fail/typeck-default-trait-impl-outside-crate.rs:13:1
|
13 | impl Copy for .. {}
| ^^^^^^^^^^^^^^^^^^^ `Copy` trait not defined in this crate
|
= note: define a new trait instead
Bonus: narrow the span to focus on the foreign trait
error[E0318]: cannot create default implementations for traits outside the crate they're defined in
--> src/test/compile-fail/typeck-default-trait-impl-outside-crate.rs:13:1
|
13 | impl Copy for .. {}
| ^^^^ trait not defined in this crate
|
= note: define a new trait instead