@@ -1238,9 +1238,6 @@ declare_lint!(MISSING_DOC, Allow,
12381238 "detects missing documentation for public members" )
12391239
12401240pub struct MissingDoc {
1241- /// Set of nodes exported from this module.
1242- exported_items : Option < ExportedItems > ,
1243-
12441241 /// Stack of IDs of struct definitions.
12451242 struct_def_stack : Vec < ast:: NodeId > ,
12461243
@@ -1252,7 +1249,6 @@ pub struct MissingDoc {
12521249impl MissingDoc {
12531250 pub fn new ( ) -> MissingDoc {
12541251 MissingDoc {
1255- exported_items : None ,
12561252 struct_def_stack : vec ! ( ) ,
12571253 doc_hidden_stack : vec ! ( false ) ,
12581254 }
@@ -1278,9 +1274,8 @@ impl MissingDoc {
12781274 // Only check publicly-visible items, using the result from the privacy pass.
12791275 // It's an option so the crate root can also use this function (it doesn't
12801276 // have a NodeId).
1281- let exported = self . exported_items . as_ref ( ) . expect ( "exported_items not set" ) ;
12821277 match id {
1283- Some ( ref id) if !exported . contains ( id) => return ,
1278+ Some ( ref id) if !cx . exported_items . contains ( id) => return ,
12841279 _ => ( )
12851280 }
12861281
@@ -1327,10 +1322,7 @@ impl LintPass for MissingDoc {
13271322 assert ! ( popped == id) ;
13281323 }
13291324
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 ) {
13341326 self . check_missing_doc_attrs ( cx, None , krate. attrs . as_slice ( ) ,
13351327 krate. span , "crate" ) ;
13361328 }
0 commit comments