update comment
This commit is contained in:
parent
01ad0ad653
commit
c833a9b4b4
@ -58,14 +58,11 @@ pub fn higher_ranked_sub<T>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
||||||
/// Replaces all regions (resp. types) bound by `binder` with placeholder
|
/// Replaces all bound variables (lifetimes, types, and constants) bound by
|
||||||
/// regions (resp. types) and return a map indicating which bound-region
|
/// `binder` with placeholder variables.
|
||||||
/// placeholder region. This is the first step of checking subtyping
|
|
||||||
/// when higher-ranked things are involved.
|
|
||||||
///
|
///
|
||||||
/// **Important:** You have to be careful to not leak these placeholders,
|
/// This is the first step of checking subtyping when higher-ranked things are involved.
|
||||||
/// for more information about how placeholders and HRTBs work, see
|
/// For more details visit the relevant sections of the [rustc dev guide].
|
||||||
/// the [rustc dev guide].
|
|
||||||
///
|
///
|
||||||
/// [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/traits/hrtb.html
|
/// [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
|
pub fn replace_bound_vars_with_placeholders<T>(&self, binder: ty::Binder<'tcx, T>) -> T
|
||||||
|
Loading…
Reference in New Issue
Block a user