From 1f5150b11bdf6708fbdf35bf2c2fd2e5027ca4ae Mon Sep 17 00:00:00 2001 From: Boxy Date: Sat, 18 Jan 2025 22:47:15 +0000 Subject: [PATCH] point to docs for ambig const/ty on intravisit --- compiler/rustc_hir/src/intravisit.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compiler/rustc_hir/src/intravisit.rs b/compiler/rustc_hir/src/intravisit.rs index e047261e2e3f..5901738a7aab 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)