File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -1870,6 +1870,8 @@ impl LintPass for MissingDoc {
18701870 }
18711871 return
18721872 } ,
1873+ ast:: ItemConst ( ..) => "a constant" ,
1874+ ast:: ItemStatic ( ..) => "a static" ,
18731875 _ => return
18741876 } ;
18751877
Original file line number Diff line number Diff line change @@ -150,6 +150,27 @@ pub enum PubBaz3 {
150150#[ doc( hidden) ]
151151pub fn baz ( ) { }
152152
153+
154+ const FOO : u32 = 0 ;
155+ /// dox
156+ pub const FOO1 : u32 = 0 ;
157+ #[ allow( missing_docs) ]
158+ pub const FOO2 : u32 = 0 ;
159+ #[ doc( hidden) ]
160+ pub const FOO3 : u32 = 0 ;
161+ pub const FOO4 : u32 = 0 ; //~ ERROR: missing documentation for a const
162+
163+
164+ static BAR : u32 = 0 ;
165+ /// dox
166+ pub static BAR1 : u32 = 0 ;
167+ #[ allow( missing_docs) ]
168+ pub static BAR2 : u32 = 0 ;
169+ #[ doc( hidden) ]
170+ pub static BAR3 : u32 = 0 ;
171+ pub static BAR4 : u32 = 0 ; //~ ERROR: missing documentation for a static
172+
173+
153174mod internal_impl {
154175 /// dox
155176 pub fn documented ( ) { }
You can’t perform that action at this time.
0 commit comments