Skip to content

Commit

Permalink
Rollup merge of #94840 - lcnr:update-comment, r=Dylan-DPC
Browse files Browse the repository at this point in the history
update `replace_bound_vars_with_placeholders` doc comment
  • Loading branch information
Dylan-DPC authored Mar 11, 2022
2 parents cdd6d39 + c833a9b commit 4ec98d8
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions compiler/rustc_infer/src/infer/higher_ranked/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,11 @@ impl<'a, 'tcx> CombineFields<'a, 'tcx> {
}

impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
/// Replaces all regions (resp. types) bound by `binder` with placeholder
/// regions (resp. types) and return a map indicating which bound-region
/// placeholder region. This is the first step of checking subtyping
/// when higher-ranked things are involved.
/// Replaces all bound variables (lifetimes, types, and constants) bound by
/// `binder` with placeholder variables.
///
/// **Important:** You have to be careful to not leak these placeholders,
/// for more information about how placeholders and HRTBs work, see
/// the [rustc dev guide].
/// This is the first step of checking subtyping when higher-ranked things are involved.
/// For more details visit the relevant sections of the [rustc dev guide].
///
/// [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/traits/hrtb.html
pub fn replace_bound_vars_with_placeholders<T>(&self, binder: ty::Binder<'tcx, T>) -> T
Expand Down

0 comments on commit 4ec98d8

Please sign in to comment.