File tree Expand file tree Collapse file tree 4 files changed +45
-6
lines changed Expand file tree Collapse file tree 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 {
6060 }
6161 Variant :: CLike => VariantItem ( Variant :: CLike ) ,
6262 } ,
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,
6583 }
6684 }
6785
Original file line number Diff line number Diff line change 11use super :: Pass ;
2+ use crate :: clean:: * ;
23use crate :: core:: DocContext ;
3- use crate :: { clean :: * , visit:: DocVisitor } ;
4+ use crate :: visit:: DocVisitor ;
45
56use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
67use rustc_hir:: def_id:: DefId ;
Original file line number Diff line number Diff line change @@ -3,9 +3,11 @@ use crate::clean::*;
33use crate :: core:: DocContext ;
44use crate :: html:: markdown:: main_body_opts;
55use crate :: visit:: DocVisitor ;
6- use core :: ops :: Range ;
6+
77use pulldown_cmark:: { Event , Parser , Tag } ;
8+
89use std:: iter:: Peekable ;
10+ use std:: ops:: Range ;
911use std:: str:: CharIndices ;
1012
1113crate 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 {
2323 Variant :: Tuple ( fields) => fields. iter ( ) . for_each ( |x| self . visit_item ( x) ) ,
2424 Variant :: CLike => { }
2525 } ,
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 ( _) => { }
2846 }
2947 }
3048
You can’t perform that action at this time.
0 commit comments