Skip to content

Invalid lifetime syntax in "conflicting implementation" error message #54690

Closed
@dtolnay

Description

@dtolnay

I noticed error output like the following in the ui tests of #54687.

error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `&NotSync`:
  --> $DIR/coherence-impls-copy.rs:41:1
   |
   | impl Copy for &'static NotSync {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: conflicting implementation in crate `core`:
           - impl<'_, T> std::marker::Copy for &T
             where T: ?Sized;

The impl<'_, T> is not valid syntax. The error message should use impl<T>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions