Skip to content

Commit d0a2a3f

Browse files
committed
Move internal lints to librustc_lint.
1 parent cd8377d commit d0a2a3f

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3636,6 +3636,7 @@ dependencies = [
36363636
"rustc",
36373637
"rustc_data_structures",
36383638
"rustc_error_codes",
3639+
"rustc_errors",
36393640
"rustc_feature",
36403641
"rustc_index",
36413642
"rustc_session",

src/librustc/lint/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,6 @@ pub type LevelSource = (Level, LintSource);
369369

370370
pub mod builtin;
371371
mod context;
372-
pub mod internal;
373372
mod levels;
374373

375374
pub use self::levels::{LintLevelMap, LintLevelSets, LintLevelsBuilder};

src/librustc_lint/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@ rustc_span = { path = "../librustc_span" }
1818
rustc_data_structures = { path = "../librustc_data_structures" }
1919
rustc_feature = { path = "../librustc_feature" }
2020
rustc_index = { path = "../librustc_index" }
21+
rustc_errors = { path = "../librustc_errors" }
2122
rustc_error_codes = { path = "../librustc_error_codes" }
2223
rustc_session = { path = "../librustc_session" }

src/librustc/lint/internal.rs renamed to src/librustc_lint/internal.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
//! Some lints that are only useful in the compiler or crates that use compiler internals, such as
22
//! Clippy.
33
4-
use crate::hir::{GenericArg, HirId, MutTy, Mutability, Path, PathSegment, QPath, Ty, TyKind};
5-
use crate::lint::{
4+
use rustc::hir::{GenericArg, HirId, MutTy, Mutability, Path, PathSegment, QPath, Ty, TyKind};
5+
use rustc::lint::{
66
EarlyContext, EarlyLintPass, LateContext, LateLintPass, LintArray, LintContext, LintPass,
77
};
8-
use errors::Applicability;
98
use rustc_data_structures::fx::FxHashMap;
9+
use rustc_errors::Applicability;
1010
use rustc_session::declare_tool_lint;
1111
use rustc_span::symbol::{sym, Symbol};
1212
use syntax::ast::{Ident, Item, ItemKind};

src/librustc_lint/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ extern crate rustc_session;
2525
mod array_into_iter;
2626
pub mod builtin;
2727
mod early;
28+
mod internal;
2829
mod late;
2930
mod levels;
3031
mod non_ascii_idents;
@@ -54,7 +55,6 @@ use builtin::*;
5455
use non_ascii_idents::*;
5556
use nonstandard_style::*;
5657
use redundant_semicolon::*;
57-
use rustc::lint::internal::*;
5858
use types::*;
5959
use unused::*;
6060

@@ -390,6 +390,7 @@ fn register_builtins(store: &mut lint::LintStore, no_interleave_lints: bool) {
390390
}
391391

392392
fn register_internals(store: &mut lint::LintStore) {
393+
use internal::*;
393394
store.register_lints(&DefaultHashTypes::get_lints());
394395
store.register_early_pass(|| box DefaultHashTypes::new());
395396
store.register_lints(&LintPassImpl::get_lints());

0 commit comments

Comments
 (0)