Skip to content

Commit 7278e29

Browse files
Document invariants of mk_trait_obligation_with_new_self_ty
1 parent d2bacb1 commit 7278e29

File tree

1 file changed

+4
-0
lines changed
  • src/librustc_trait_selection/traits/error_reporting

1 file changed

+4
-0
lines changed

src/librustc_trait_selection/traits/error_reporting/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,6 +1000,10 @@ trait InferCtxtPrivExt<'tcx> {
10001000
trait_ref: &ty::PolyTraitRef<'tcx>,
10011001
);
10021002

1003+
/// Creates a `PredicateObligation` with `new_self_ty` replacing the existing type in the
1004+
/// `trait_ref`.
1005+
///
1006+
/// For this to work, `new_self_ty` must have no escaping bound variables.
10031007
fn mk_trait_obligation_with_new_self_ty(
10041008
&self,
10051009
param_env: ty::ParamEnv<'tcx>,

0 commit comments

Comments
 (0)