Skip to content

ICE with impl Foo for Foo for object safe Foo #20939

Closed
@huonw

Description

@huonw
trait Foo {}

impl<'a> Foo for Foo+'a {}

fn main() {}
<anon>:3:1: 3:27 error: internal compiler error: coherence failed to report ambiguity: cannot locate the impl of the trait `Foo` for the type `Foo + 'a`
<anon>:3 impl<'a> Foo for Foo+'a {}
         ^~~~~~~~~~~~~~~~~~~~~~~~~~

cc #20940

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-trait-systemArea: Trait systemE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions