Rollup merge of #94840 - lcnr:update-comment, r=Dylan-DPC

update `replace_bound_vars_with_placeholders` doc comment
This commit is contained in:
Dylan DPC 2022-03-11 13:38:38 +01:00 committed by GitHub
commit 4ec98d8415
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,14 +58,11 @@ pub fn higher_ranked_sub<T>(
}
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