Skip to content

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

Open
@compiler-errors

Description

@compiler-errors

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-incompleteincorrectly return `NoSolution`, unsound during coherenceA-normalization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions