diff options
| author | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2020-05-18 11:18:41 -0700 |
|---|---|---|
| committer | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2020-05-22 13:34:41 -0700 |
| commit | 7278e29592b96207c755bedcc846b64a93aa9281 (patch) | |
| tree | 5842152134b805357b3045f4ea1af2a8efbfbda6 | |
| parent | d2bacb18d2bf9eadca86fe7c1483e38ce774750e (diff) | |
| download | rust-7278e29592b96207c755bedcc846b64a93aa9281.tar.gz rust-7278e29592b96207c755bedcc846b64a93aa9281.zip | |
Document invariants of `mk_trait_obligation_with_new_self_ty`
| -rw-r--r-- | src/librustc_trait_selection/traits/error_reporting/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/librustc_trait_selection/traits/error_reporting/mod.rs b/src/librustc_trait_selection/traits/error_reporting/mod.rs index c59abd36021..b1c6815c741 100644 --- a/src/librustc_trait_selection/traits/error_reporting/mod.rs +++ b/src/librustc_trait_selection/traits/error_reporting/mod.rs @@ -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>, |
