Skip to content

Rejection of self-referential closure signature in new solver due to lack of eager norm #191

Open
@compiler-errors

Description

@compiler-errors

This affects polars

trait Indir<T>: FnOnce(T) -> Self::Ret {
    type Ret;
}
impl<F, T, R> Indir<T> for F where F: FnOnce(T) -> R {
    type Ret = R;
}

trait Mirror {
    type Assoc<'a>;
}

fn needs<T: Mirror>(_: impl for<'a> Indir<T::Assoc<'a>>) {}

fn test<T>() where for<'a> T: Mirror<Assoc<'a> = i32> {
    needs::<T>(|x| { x.to_string(); });
}

Metadata

Metadata

Labels

from-craterA regression found via a crater run, not part of our test suite

Type

No type

Projects

Status

todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions