Document invariants of mk_trait_obligation_with_new_self_ty

This commit is contained in:
Dylan MacKenzie 2020-05-18 11:18:41 -07:00
parent d2bacb18d2
commit 7278e29592

View File

@ -1000,6 +1000,10 @@ trait InferCtxtPrivExt<'tcx> {
trait_ref: &ty::PolyTraitRef<'tcx>,
);
/// Creates a `PredicateObligation` with `new_self_ty` replacing the existing type in the
/// `trait_ref`.
///
/// For this to work, `new_self_ty` must have no escaping bound variables.
fn mk_trait_obligation_with_new_self_ty(
&self,
param_env: ty::ParamEnv<'tcx>,