Encode whether foreign opaques are TAITs or not

This commit is contained in:
Michael Goulet 2023-01-18 18:03:06 +00:00
parent 79335f1ac4
commit 200f466d1a
8 changed files with 23 additions and 2 deletions

View file

@ -654,7 +654,7 @@ impl<'tcx> WfPredicates<'tcx> {
// All of the requirements on type parameters
// have already been checked for `impl Trait` in
// return position. We do need to check type-alias-impl-trait though.
if ty::is_impl_trait_defn(self.tcx, def_id).is_none() {
if self.tcx.is_type_alias_impl_trait(def_id) {
let obligations = self.nominal_obligations(def_id, substs);
self.out.extend(obligations);
}