Implement assumed_wf_types for RPITITs' implementations

This commit is contained in:
Michael Goulet 2023-07-17 18:12:49 +00:00
parent 349a2372ed
commit 50d21091ee
6 changed files with 102 additions and 33 deletions

View file

@ -885,6 +885,13 @@ rustc_queries! {
desc { |tcx| "computing the implied bounds of `{}`", tcx.def_path_str(key) }
}
/// We need to store the assumed_wf_types for an RPITIT so that impls of foreign
/// traits with return-position impl trait in traits can inherit the right wf types.
query assumed_wf_types_for_rpitit(key: DefId) -> &'tcx [(Ty<'tcx>, Span)] {
desc { |tcx| "computing the implied bounds of `{}`", tcx.def_path_str(key) }
separate_provide_extern
}
/// Computes the signature of the function.
query fn_sig(key: DefId) -> ty::EarlyBinder<ty::PolyFnSig<'tcx>> {
desc { |tcx| "computing function signature of `{}`", tcx.def_path_str(key) }