File tree 2 files changed +23
-0
lines changed
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 {
1870
1870
}
1871
1871
return
1872
1872
} ,
1873
+ ast:: ItemConst ( ..) => "a constant" ,
1874
+ ast:: ItemStatic ( ..) => "a static" ,
1873
1875
_ => return
1874
1876
} ;
1875
1877
Original file line number Diff line number Diff line change @@ -150,6 +150,27 @@ pub enum PubBaz3 {
150
150
#[ doc( hidden) ]
151
151
pub fn baz ( ) { }
152
152
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
+
153
174
mod internal_impl {
154
175
/// dox
155
176
pub fn documented ( ) { }
You can’t perform that action at this time.
0 commit comments