We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fd2c811 commit dc9c4adCopy full SHA for dc9c4ad
src/librustdoc/visit.rs
@@ -1,5 +1,11 @@
1
use crate::clean::*;
2
3
+/// allows a type to traverse the cleaned as of a crate.
4
+///
5
+/// note that like [`rustc_ast::visit::Visitor`], but
6
+/// unlike [`rustc_lint::EarlyLintPass`], if you override a
7
+/// `visit_*` method, you will need to manually recurse over
8
+/// its contents.
9
pub(crate) trait DocVisitor: Sized {
10
fn visit_item(&mut self, item: &Item) {
11
self.visit_item_recur(item)
@@ -58,6 +64,7 @@ pub(crate) trait DocVisitor: Sized {
58
64
m.items.iter().for_each(|i| self.visit_item(i))
59
65
}
60
66
67
+ /// the main entrypoint of [`DocVisitor`].
61
68
fn visit_crate(&mut self, c: &Crate) {
62
69
self.visit_item(&c.module);
63
70
0 commit comments