Drop the ExportedItems argument from LintPass::check_crate
None of the builtin lints use this, and it's now available through the Context.
This commit is contained in:
parent
6fede93475
commit
ba1c0c4232
|
@ -30,7 +30,6 @@ use middle::def::*;
|
|||
use middle::trans::adt; // for `adt::is_ffi_safe`
|
||||
use middle::typeck::astconv::ast_ty_to_ty;
|
||||
use middle::typeck::infer;
|
||||
use middle::privacy::ExportedItems;
|
||||
use middle::{typeck, ty, def, pat_util};
|
||||
use util::ppaux::{ty_to_str};
|
||||
use util::nodemap::NodeSet;
|
||||
|
@ -1322,7 +1321,7 @@ impl LintPass for MissingDoc {
|
|||
assert!(popped == id);
|
||||
}
|
||||
|
||||
fn check_crate(&mut self, cx: &Context, _: &ExportedItems, krate: &ast::Crate) {
|
||||
fn check_crate(&mut self, cx: &Context, krate: &ast::Crate) {
|
||||
self.check_missing_doc_attrs(cx, None, krate.attrs.as_slice(),
|
||||
krate.span, "crate");
|
||||
}
|
||||
|
|
|
@ -641,7 +641,7 @@ pub fn check_crate(tcx: &ty::ctxt,
|
|||
|
||||
// since the root module isn't visited as an item (because it isn't an
|
||||
// item), warn for it here.
|
||||
run_lints!(cx, check_crate, exported_items, krate);
|
||||
run_lints!(cx, check_crate, krate);
|
||||
|
||||
visit::walk_crate(cx, krate, ());
|
||||
});
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
|
||||
#![macro_escape]
|
||||
|
||||
use middle::privacy::ExportedItems;
|
||||
use std::hash;
|
||||
use std::ascii::StrAsciiExt;
|
||||
use syntax::codemap::Span;
|
||||
|
@ -122,7 +121,7 @@ pub trait LintPass {
|
|||
/// `Lint`, make it a private `static` item in its own module.
|
||||
fn get_lints(&self) -> LintArray;
|
||||
|
||||
fn check_crate(&mut self, _: &Context, _: &ExportedItems, _: &ast::Crate) { }
|
||||
fn check_crate(&mut self, _: &Context, _: &ast::Crate) { }
|
||||
fn check_ident(&mut self, _: &Context, _: Span, _: ast::Ident) { }
|
||||
fn check_mod(&mut self, _: &Context, _: &ast::Mod, _: Span, _: ast::NodeId) { }
|
||||
fn check_view_item(&mut self, _: &Context, _: &ast::ViewItem) { }
|
||||
|
|
Loading…
Reference in New Issue