Skip to content

Commit ba1c0c4

Browse files
author
Keegan McAllister
committed
Drop the ExportedItems argument from LintPass::check_crate
None of the builtin lints use this, and it's now available through the Context.
1 parent 6fede93 commit ba1c0c4

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/librustc/lint/builtin.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ use middle::def::*;
3030
use middle::trans::adt; // for `adt::is_ffi_safe`
3131
use middle::typeck::astconv::ast_ty_to_ty;
3232
use middle::typeck::infer;
33-
use middle::privacy::ExportedItems;
3433
use middle::{typeck, ty, def, pat_util};
3534
use util::ppaux::{ty_to_str};
3635
use util::nodemap::NodeSet;
@@ -1322,7 +1321,7 @@ impl LintPass for MissingDoc {
13221321
assert!(popped == id);
13231322
}
13241323

1325-
fn check_crate(&mut self, cx: &Context, _: &ExportedItems, krate: &ast::Crate) {
1324+
fn check_crate(&mut self, cx: &Context, krate: &ast::Crate) {
13261325
self.check_missing_doc_attrs(cx, None, krate.attrs.as_slice(),
13271326
krate.span, "crate");
13281327
}

src/librustc/lint/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ pub fn check_crate(tcx: &ty::ctxt,
641641

642642
// since the root module isn't visited as an item (because it isn't an
643643
// item), warn for it here.
644-
run_lints!(cx, check_crate, exported_items, krate);
644+
run_lints!(cx, check_crate, krate);
645645

646646
visit::walk_crate(cx, krate, ());
647647
});

src/librustc/lint/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
3030
#![macro_escape]
3131

32-
use middle::privacy::ExportedItems;
3332
use std::hash;
3433
use std::ascii::StrAsciiExt;
3534
use syntax::codemap::Span;
@@ -122,7 +121,7 @@ pub trait LintPass {
122121
/// `Lint`, make it a private `static` item in its own module.
123122
fn get_lints(&self) -> LintArray;
124123

125-
fn check_crate(&mut self, _: &Context, _: &ExportedItems, _: &ast::Crate) { }
124+
fn check_crate(&mut self, _: &Context, _: &ast::Crate) { }
126125
fn check_ident(&mut self, _: &Context, _: Span, _: ast::Ident) { }
127126
fn check_mod(&mut self, _: &Context, _: &ast::Mod, _: Span, _: ast::NodeId) { }
128127
fn check_view_item(&mut self, _: &Context, _: &ast::ViewItem) { }

0 commit comments

Comments
 (0)