Open Veykril opened 2 weeks ago
Test fixture that currently fails
//- minicore: sized
pub trait Lookup {
type Data;
fn lookup(&self) -> Self::Data;
}
pub trait ItemTreeLoc {
type Id;
}
fn id_to_generics(id: impl Lookup<Data = impl ItemTreeLoc<Id = ()>>)
//^^ impl Lookup<Data = impl ItemTreeLoc<Id = ()>>
where
(): Sized,
{}
Something is still wrong here
#[test]
fn nested_anon_generics_and_where_bounds_17173() {
check_types(
r#"
//- minicore: sized, fn
pub trait Lookup {
type Data;
fn lookup(&self) -> Self::Data;
}
pub trait ItemTreeLoc {
type Id;
}
fn id_to_generics(id: impl Lookup<Data = impl ItemTreeLoc<Id = ()>>,
//^^ impl Lookup<Data = impl ItemTreeLoc<Id = ()>>
enabled_params: impl Fn(),
//^^^^^^^^^^^^^^ impl Fn()
)
where
(): Sized,
{}
"#,
);
}
The impl Fn()
is being recognized as impl ItemTreeLoc<Id = ()>
This was fixed in #17176, right?