// check-pass trait A { type Foo; } impl A for T { type Foo = (); } fn foo() -> impl std::borrow::Borrow<::Foo> { () } fn main() { foo(); }