Skip to content

Properly support regions in overlap for negative impls #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spastorino opened this issue Jan 24, 2022 · 1 comment
Closed

Properly support regions in overlap for negative impls #2

spastorino opened this issue Jan 24, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@spastorino
Copy link
Member

spastorino commented Jan 24, 2022

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 &() { }
@spastorino
Copy link
Member Author

I think we can close this one now that's merged. cc @nikomatsakis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants