We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 373293c commit 33d21e6Copy full SHA for 33d21e6
compiler/rustc_ty_utils/src/ty.rs
@@ -131,7 +131,9 @@ fn param_env(tcx: TyCtxt<'_>, def_id: DefId) -> ty::ParamEnv<'_> {
131
if let Some(ImplTraitInTraitData::Trait { fn_def_id, .. })
132
| Some(ImplTraitInTraitData::Impl { fn_def_id, .. }) = tcx.opt_rpitit_info(def_id)
133
{
134
- predicates = tcx.predicates_of(fn_def_id).instantiate_identity(tcx).predicates;
+ // FIXME(-Zlower-impl-trait-in-trait-to-assoc-ty): Should not need to add the predicates
135
+ // from the parent fn to our assumptions
136
+ predicates.extend(tcx.predicates_of(fn_def_id).instantiate_identity(tcx).predicates);
137
}
138
139
// Finally, we have to normalize the bounds in the environment, in
0 commit comments