about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-03-11 13:38:38 +0100
committerGitHub <noreply@github.com>2022-03-11 13:38:38 +0100
commit4ec98d8415dc6a6639218396fe323151a3e7ab82 (patch)
tree546e2338e5293149056a15eeedeafdc42e5a4f0f
parentcdd6d39eccb687f20113893902eafd8ba81b4acf (diff)
parentc833a9b4b4a3dea011155926d3b9d2a26bfd4ae1 (diff)
downloadrust-4ec98d8415dc6a6639218396fe323151a3e7ab82.tar.gz
rust-4ec98d8415dc6a6639218396fe323151a3e7ab82.zip
Rollup merge of #94840 - lcnr:update-comment, r=Dylan-DPC
update `replace_bound_vars_with_placeholders` doc comment
-rw-r--r--compiler/rustc_infer/src/infer/higher_ranked/mod.rs11
1 files changed, 4 insertions, 7 deletions
diff --git a/compiler/rustc_infer/src/infer/higher_ranked/mod.rs b/compiler/rustc_infer/src/infer/higher_ranked/mod.rs
index 652f5abab15..73cc411e533 100644
--- a/compiler/rustc_infer/src/infer/higher_ranked/mod.rs
+++ b/compiler/rustc_infer/src/infer/higher_ranked/mod.rs
@@ -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