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 @@ -1612,6 +1612,8 @@ impl LintPass for MissingDoc {
1612
1612
}
1613
1613
return
1614
1614
} ,
1615
+ ast:: ItemConst ( ..) => "a constant" ,
1616
+ ast:: ItemStatic ( ..) => "a static" ,
1615
1617
_ => return
1616
1618
} ;
1617
1619
Original file line number Diff line number Diff line change @@ -149,6 +149,27 @@ pub enum PubBaz3 {
149
149
#[ doc( hidden) ]
150
150
pub fn baz ( ) { }
151
151
152
+
153
+ const FOO : u32 = 0 ;
154
+ /// dox
155
+ pub const FOO1 : u32 = 0 ;
156
+ #[ allow( missing_docs) ]
157
+ pub const FOO2 : u32 = 0 ;
158
+ #[ doc( hidden) ]
159
+ pub const FOO3 : u32 = 0 ;
160
+ pub const FOO4 : u32 = 0 ; //~ ERROR: missing documentation for a const
161
+
162
+
163
+ static BAR : u32 = 0 ;
164
+ /// dox
165
+ pub static BAR1 : u32 = 0 ;
166
+ #[ allow( missing_docs) ]
167
+ pub static BAR2 : u32 = 0 ;
168
+ #[ doc( hidden) ]
169
+ pub static BAR3 : u32 = 0 ;
170
+ pub static BAR4 : u32 = 0 ; //~ ERROR: missing documentation for a static
171
+
172
+
152
173
mod internal_impl {
153
174
/// dox
154
175
pub fn documented ( ) { }
You can’t perform that action at this time.
0 commit comments