mod array_into_iter;
pub mod builtin;
+mod early;
+mod late;
+mod levels;
mod non_ascii_idents;
mod nonstandard_style;
mod redundant_semicolon;
mod types;
mod unused;
-use rustc::hir;
-use rustc::hir::def_id::DefId;
use rustc::lint;
use rustc::lint::builtin::{
BARE_TRAIT_OBJECTS, ELIDED_LIFETIMES_IN_PATHS, EXPLICIT_OUTLIVES_REQUIREMENTS,
use rustc::lint::{EarlyContext, EarlyLintPass, LateContext, LateLintPass, LintArray, LintPass};
use rustc::ty::query::Providers;
use rustc::ty::TyCtxt;
+use rustc_hir as hir;
+use rustc_hir::def_id::DefId;
+use rustc_span::Span;
use syntax::ast;
-use syntax_pos::Span;
use lint::LintId;
/// Useful for other parts of the compiler.
pub use builtin::SoftLints;
+pub use early::check_ast_crate;
+pub use late::check_crate;
pub fn provide(providers: &mut Providers<'_>) {
+ levels::provide(providers);
*providers = Providers { lint_mod, ..*providers };
}
fn lint_mod(tcx: TyCtxt<'_>, module_def_id: DefId) {
- lint::late_lint_mod(tcx, module_def_id, BuiltinCombinedModuleLateLintPass::new());
+ late::late_lint_mod(tcx, module_def_id, BuiltinCombinedModuleLateLintPass::new());
}
macro_rules! pre_expansion_lint_passes {