// compile-flags: -Znext-solver // check-pass // Makes sure we don't prepopulate the MIR typeck of `define` // with `Foo = T`, but instead, `Foo = B`, so that // the param-env predicates actually apply. #![feature(type_alias_impl_trait)] type Foo = impl NeedsSend; trait NeedsSend {} impl NeedsSend for T {} fn define(a: A, b: B, _: Foo) { let y: Option> = Some(b); } fn main() {}