Skip to content

Properly support regions in overlap for negative impls #2

Closed
@spastorino

Description

@spastorino

The following code should not compile but it does. This was noted in rust-lang/rust#93175 where we know we are doing predicate_must_hold_modulo_regions but we shouldn't exactly do that.

trait Foo { }
impl !Foo for &'static () { }

trait Bar { }
#[rustc_strict_coherence]
impl<T: Foo> Bar for T { }
#[rustc_strict_coherence]
impl Bar for &() { }

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions