Elaborate supertraits in dyn candidates

This commit is contained in:
Michael Goulet 2024-07-18 12:08:57 -04:00
parent 6a891ec4fe
commit fa9ae7b9d3
3 changed files with 15 additions and 6 deletions

View file

@ -2800,6 +2800,7 @@ impl<'tcx> SelectionContext<'_, 'tcx> {
});
}
// Register any outlives obligations from the trait here, cc #124336.
if matches!(self.tcx().def_kind(def_id), DefKind::Impl { of_trait: true })
&& let Some(header) = self.tcx().impl_trait_header(def_id)
{