Skip to content

r-a gets confused with nested anonymous type params when additional where bounds are involved #17173

Closed
@Veykril

Description

@Veykril
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 = ()>>)
where
    (): Sized, // error below disappears if this is removed
{
    id.lookup(); // no method `lookup` on type `impl ItemTreeLoc<Id = ()>
}

Metadata

Metadata

Assignees

Labels

A-tytype system / type inference / traits / method resolutionC-bugCategory: bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions