Skip to content

E0318 needs to be updated to new format #35322

Closed
@sophiajt

Description

@sophiajt

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 

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions