Skip to content

Commit

Permalink
Document invariants of mk_trait_obligation_with_new_self_ty
Browse files Browse the repository at this point in the history
  • Loading branch information
ecstatic-morse committed May 22, 2020
1 parent d2bacb1 commit 7278e29
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/librustc_trait_selection/traits/error_reporting/mod.rs
Expand Up @@ -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>,
Expand Down

0 comments on commit 7278e29

Please sign in to comment.