@@ -1238,9 +1238,6 @@ declare_lint!(MISSING_DOC, Allow,
1238
1238
"detects missing documentation for public members" )
1239
1239
1240
1240
pub struct MissingDoc {
1241
- /// Set of nodes exported from this module.
1242
- exported_items : Option < ExportedItems > ,
1243
-
1244
1241
/// Stack of IDs of struct definitions.
1245
1242
struct_def_stack : Vec < ast:: NodeId > ,
1246
1243
@@ -1252,7 +1249,6 @@ pub struct MissingDoc {
1252
1249
impl MissingDoc {
1253
1250
pub fn new ( ) -> MissingDoc {
1254
1251
MissingDoc {
1255
- exported_items : None ,
1256
1252
struct_def_stack : vec ! ( ) ,
1257
1253
doc_hidden_stack : vec ! ( false ) ,
1258
1254
}
@@ -1278,9 +1274,8 @@ impl MissingDoc {
1278
1274
// Only check publicly-visible items, using the result from the privacy pass.
1279
1275
// It's an option so the crate root can also use this function (it doesn't
1280
1276
// have a NodeId).
1281
- let exported = self . exported_items . as_ref ( ) . expect ( "exported_items not set" ) ;
1282
1277
match id {
1283
- Some ( ref id) if !exported . contains ( id) => return ,
1278
+ Some ( ref id) if !cx . exported_items . contains ( id) => return ,
1284
1279
_ => ( )
1285
1280
}
1286
1281
@@ -1327,10 +1322,7 @@ impl LintPass for MissingDoc {
1327
1322
assert ! ( popped == id) ;
1328
1323
}
1329
1324
1330
- fn check_crate ( & mut self , cx : & Context , exported : & ExportedItems , krate : & ast:: Crate ) {
1331
- // FIXME: clone to avoid lifetime trickiness
1332
- self . exported_items = Some ( exported. clone ( ) ) ;
1333
-
1325
+ fn check_crate ( & mut self , cx : & Context , _: & ExportedItems , krate : & ast:: Crate ) {
1334
1326
self . check_missing_doc_attrs ( cx, None , krate. attrs . as_slice ( ) ,
1335
1327
krate. span , "crate" ) ;
1336
1328
}
0 commit comments