File tree 4 files changed +45
-6
lines changed
4 files changed +45
-6
lines changed Original file line number Diff line number Diff line change @@ -60,8 +60,26 @@ crate trait DocFolder: Sized {
60
60
}
61
61
Variant :: CLike => VariantItem ( Variant :: CLike ) ,
62
62
} ,
63
- // FIXME: list all cases explicitly
64
- x => x,
63
+ ExternCrateItem { src : _ }
64
+ | ImportItem ( _)
65
+ | FunctionItem ( _)
66
+ | TypedefItem ( _, _)
67
+ | OpaqueTyItem ( _)
68
+ | StaticItem ( _)
69
+ | ConstantItem ( _)
70
+ | TraitAliasItem ( _)
71
+ | TyMethodItem ( _)
72
+ | MethodItem ( _, _)
73
+ | StructFieldItem ( _)
74
+ | ForeignFunctionItem ( _)
75
+ | ForeignStaticItem ( _)
76
+ | ForeignTypeItem
77
+ | MacroItem ( _)
78
+ | ProcMacroItem ( _)
79
+ | PrimitiveItem ( _)
80
+ | AssocConstItem ( _, _)
81
+ | AssocTypeItem ( _, _)
82
+ | KeywordItem ( _) => kind,
65
83
}
66
84
}
67
85
Original file line number Diff line number Diff line change 1
1
use super :: Pass ;
2
+ use crate :: clean:: * ;
2
3
use crate :: core:: DocContext ;
3
- use crate :: { clean :: * , visit:: DocVisitor } ;
4
+ use crate :: visit:: DocVisitor ;
4
5
5
6
use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
6
7
use rustc_hir:: def_id:: DefId ;
Original file line number Diff line number Diff line change @@ -3,9 +3,11 @@ use crate::clean::*;
3
3
use crate :: core:: DocContext ;
4
4
use crate :: html:: markdown:: main_body_opts;
5
5
use crate :: visit:: DocVisitor ;
6
- use core :: ops :: Range ;
6
+
7
7
use pulldown_cmark:: { Event , Parser , Tag } ;
8
+
8
9
use std:: iter:: Peekable ;
10
+ use std:: ops:: Range ;
9
11
use std:: str:: CharIndices ;
10
12
11
13
crate const CHECK_INVALID_HTML_TAGS : Pass = Pass {
Original file line number Diff line number Diff line change @@ -23,8 +23,26 @@ crate trait DocVisitor: Sized {
23
23
Variant :: Tuple ( fields) => fields. iter ( ) . for_each ( |x| self . visit_item ( x) ) ,
24
24
Variant :: CLike => { }
25
25
} ,
26
- // FIXME: list all cases explicitly
27
- _ => return ,
26
+ ExternCrateItem { src : _ }
27
+ | ImportItem ( _)
28
+ | FunctionItem ( _)
29
+ | TypedefItem ( _, _)
30
+ | OpaqueTyItem ( _)
31
+ | StaticItem ( _)
32
+ | ConstantItem ( _)
33
+ | TraitAliasItem ( _)
34
+ | TyMethodItem ( _)
35
+ | MethodItem ( _, _)
36
+ | StructFieldItem ( _)
37
+ | ForeignFunctionItem ( _)
38
+ | ForeignStaticItem ( _)
39
+ | ForeignTypeItem
40
+ | MacroItem ( _)
41
+ | ProcMacroItem ( _)
42
+ | PrimitiveItem ( _)
43
+ | AssocConstItem ( _, _)
44
+ | AssocTypeItem ( _, _)
45
+ | KeywordItem ( _) => { }
28
46
}
29
47
}
30
48
You can’t perform that action at this time.
0 commit comments