Skip to content

not normalizing tait parameters before checking if it's a defining usage #49

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
compiler-errors opened this issue Jul 23, 2023 · 0 comments
Labels
A-incomplete incorrectly return `NoSolution`, unsound during coherence A-normalization

Comments

@compiler-errors
Copy link
Member

This code stops working with lazy-norm:

#![feature(type_alias_impl_trait)]

trait Mirror {
    type Assoc;
}

impl<T> Mirror for T {
    type Assoc = T;
}

type Tait<T> = impl Sized;

// Can't actually put `-> Tait<<T as Mirror>::Assoc>` in the return type,
// since the opaque type collector doesn't normalize either.
fn x<T>() -> Tait<T> {
    let x: Tait<<T as Mirror>::Assoc> = ();
    //~^ But this user type annotation does get normalized before it's
    // unified with `()`.
    ()
}

fn main() {}

We could, perhaps, structurally normalize the opaque params before checking that they're all placeholders...

@lcnr lcnr added the A-incomplete incorrectly return `NoSolution`, unsound during coherence label Jul 24, 2023
@lcnr lcnr moved this to potentially irrelevant in -Znext-solver=globally Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incomplete incorrectly return `NoSolution`, unsound during coherence A-normalization
Projects
None yet
Development

No branches or pull requests

2 participants