//@ check-pass trait AsBufferView { type Device; } trait Error { type Span; } trait Foo { type Error: Error; fn foo(&self) -> &::Span; } impl Foo for VBuf0 where VBuf0: AsBufferView, { type Error = D; fn foo(&self) -> &::Span { todo!() } } fn main() {}