about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBoxy <rust@boxyuwu.dev>2025-01-18 22:47:15 +0000
committerBoxy <rust@boxyuwu.dev>2025-01-23 06:01:36 +0000
commit1f5150b11bdf6708fbdf35bf2c2fd2e5027ca4ae (patch)
treea9926e36557ec755ca3d6c3a8c5940b82f2029ea
parent2bdeff2fb8f452103bf63701ed419a745bb7841d (diff)
point to docs for ambig const/ty on intravisit
-rw-r--r--compiler/rustc_hir/src/intravisit.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_hir/src/intravisit.rs b/compiler/rustc_hir/src/intravisit.rs
index e047261e2e3..5901738a7aa 100644
--- a/compiler/rustc_hir/src/intravisit.rs
+++ b/compiler/rustc_hir/src/intravisit.rs
@@ -359,6 +359,9 @@ pub trait Visitor<'v>: Sized {
     /// All types are treated as ambiguous types for the purposes of hir visiting in
     /// order to ensure that visitors can handle infer vars without it being too error-prone.
     ///
+    /// See the doc comments on [`Ty`] for an explanation of what it means for a type to be
+    /// ambiguous.
+    ///
     /// The [`Visitor::visit_infer`] method should be overriden in order to handle infer vars.
     fn visit_ty(&mut self, t: &'v Ty<'v, AmbigArg>) -> Self::Result {
         walk_ty(self, t)
@@ -367,6 +370,9 @@ pub trait Visitor<'v>: Sized {
     /// All consts are treated as ambiguous consts for the purposes of hir visiting in
     /// order to ensure that visitors can handle infer vars without it being too error-prone.
     ///
+    /// See the doc comments on [`ConstArg`] for an explanation of what it means for a const to be
+    /// ambiguous.
+    ///
     /// The [`Visitor::visit_infer`] method should be overriden in order to handle infer vars.
     fn visit_const_arg(&mut self, c: &'v ConstArg<'v, AmbigArg>) -> Self::Result {
         walk_ambig_const_arg(self, c)