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