Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

‎compiler/rustc_hir/src/intravisit.rs

Lines changed: 6 additions & 0 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /