Skip to content

Commit 1983c43

Browse files
committed
Explain visit_ty_unambig naming
1 parent 23e28d3 commit 1983c43

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: compiler/rustc_hir/src/intravisit.rs

+6
Original file line numberDiff line numberDiff line change
@@ -510,11 +510,17 @@ pub trait Visitor<'v>: Sized {
510510
pub trait VisitorExt<'v>: Visitor<'v> {
511511
/// Extension trait method to visit types in unambiguous positions, this is not
512512
/// directly on the [`Visitor`] trait as this method should never be overridden.
513+
///
514+
/// Named `visit_ty_unambig` instead of `visit_unambig_ty` to aid in discovery
515+
/// by IDes when `v.visit_ty` is written.
513516
fn visit_ty_unambig(&mut self, t: &'v Ty<'v>) -> Self::Result {
514517
walk_unambig_ty(self, t)
515518
}
516519
/// Extension trait method to visit consts in unambiguous positions, this is not
517520
/// directly on the [`Visitor`] trait as this method should never be overridden.
521+
///
522+
/// Named `visit_const_arg_unambig` instead of `visit_unambig_const_arg` to aid in
523+
/// discovery by IDes when `v.visit_const_arg` is written.
518524
fn visit_const_arg_unambig(&mut self, c: &'v ConstArg<'v>) -> Self::Result {
519525
walk_const_arg(self, c)
520526
}

0 commit comments

Comments
 (0)