Skip to content

Commit

Permalink
Drop the ExportedItems argument from LintPass::check_crate
Browse files Browse the repository at this point in the history
None of the builtin lints use this, and it's now available through the Context.
  • Loading branch information
Keegan McAllister committed Jun 24, 2014
1 parent 6fede93 commit ba1c0c4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/librustc/lint/builtin.rs
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/lint/context.rs
Expand Up @@ -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, ());
});
Expand Down
3 changes: 1 addition & 2 deletions src/librustc/lint/mod.rs
Expand Up @@ -29,7 +29,6 @@

#![macro_escape]

use middle::privacy::ExportedItems;
use std::hash;
use std::ascii::StrAsciiExt;
use syntax::codemap::Span;
Expand Down Expand Up @@ -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) { }
Expand Down

0 comments on commit ba1c0c4

Please sign in to comment.