Skip to content

new solver uses a fixpoint when evaluating nested goals #102

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

Open
lcnr opened this issue Mar 21, 2024 · 0 comments
Open

new solver uses a fixpoint when evaluating nested goals #102

lcnr opened this issue Mar 21, 2024 · 0 comments

Comments

@lcnr
Copy link
Contributor

lcnr commented Mar 21, 2024

the old solver does not do so during candidate selection, causing the new solver to accept more code:

during coherence

trait Foo {}
impl<T> Foo for (u8, T, T) {}
trait NotU8 {}
trait Bar {}
impl<T, U: NotU8> Bar for (T, T, U) {}

trait NeedsFixpoint {}
impl<T: Foo + Bar> NeedsFixpoint for T {}
impl NeedsFixpoint for (u8, u8, u8) {}

trait Overlap {}
impl<T: NeedsFixpoint> Overlap for T {}
impl<T, U: NotU8, V> Overlap for (T, U, V) {}

and outside of it

trait Foo {}
impl<T> Foo for (u8, T, T) {}
trait NotU8 {}
trait Bar {}
impl<T, U: NotU8> Bar for (T, T, U) {}

trait NeedsFixpoint {}
impl<T: Foo + Bar> NeedsFixpoint for T {}
impl NeedsFixpoint for (u8, u8, u8) {}

fn impls_needs_fixpoint<T: NeedsFixpoint>() {}

fn main() {
    impls_needs_fixpoint::<(_, _, _)>()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant