#![feature(type_alias_impl_trait)] //@ check-pass trait Foo {} impl Foo for U {} type Scope = impl Foo<()>; #[allow(unused)] fn infer_scope() -> Scope { () } #[allow(unused)] fn ice() -> impl Foo { loop {} } fn main() {}