move {rustc -> rustc_session}::lint::builtin
This commit is contained in:
parent
45f27643db
commit
2b44a6c8f4
4 changed files with 29 additions and 28 deletions
|
@ -38,6 +38,7 @@ pub use crate::lint::context::{
|
||||||
LintContext, LintStore,
|
LintContext, LintStore,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pub use rustc_session::lint::builtin;
|
||||||
pub use rustc_session::lint::{BufferedEarlyLint, FutureIncompatibleInfo, Level, Lint, LintId};
|
pub use rustc_session::lint::{BufferedEarlyLint, FutureIncompatibleInfo, Level, Lint, LintId};
|
||||||
pub use rustc_session::lint::{LintArray, LintPass};
|
pub use rustc_session::lint::{LintArray, LintPass};
|
||||||
|
|
||||||
|
@ -331,7 +332,6 @@ pub enum LintSource {
|
||||||
|
|
||||||
pub type LevelSource = (Level, LintSource);
|
pub type LevelSource = (Level, LintSource);
|
||||||
|
|
||||||
pub mod builtin;
|
|
||||||
mod context;
|
mod context;
|
||||||
pub mod internal;
|
pub mod internal;
|
||||||
mod levels;
|
mod levels;
|
||||||
|
|
|
@ -4,6 +4,8 @@ use rustc_data_structures::stable_hasher::{HashStable, StableHasher, ToStableHas
|
||||||
use rustc_span::edition::Edition;
|
use rustc_span::edition::Edition;
|
||||||
use rustc_span::{sym, symbol::Ident, MultiSpan, Span, Symbol};
|
use rustc_span::{sym, symbol::Ident, MultiSpan, Span, Symbol};
|
||||||
|
|
||||||
|
pub mod builtin;
|
||||||
|
|
||||||
/// Setting for how to handle a lint.
|
/// Setting for how to handle a lint.
|
||||||
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
|
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
|
||||||
pub enum Level {
|
pub enum Level {
|
||||||
|
|
|
@ -4,10 +4,31 @@
|
||||||
//! compiler code, rather than using their own custom pass. Those
|
//! compiler code, rather than using their own custom pass. Those
|
||||||
//! lints are all available in `rustc_lint::builtin`.
|
//! lints are all available in `rustc_lint::builtin`.
|
||||||
|
|
||||||
use rustc_session::lint::FutureIncompatibleInfo;
|
use crate::lint::FutureIncompatibleInfo;
|
||||||
use rustc_session::{declare_lint, declare_lint_pass};
|
use crate::{declare_lint, declare_lint_pass};
|
||||||
use rustc_span::edition::Edition;
|
use rustc_span::edition::Edition;
|
||||||
use syntax::early_buffered_lints::{ILL_FORMED_ATTRIBUTE_INPUT, META_VARIABLE_MISUSE};
|
|
||||||
|
declare_lint! {
|
||||||
|
pub ILL_FORMED_ATTRIBUTE_INPUT,
|
||||||
|
Deny,
|
||||||
|
"ill-formed attribute inputs that were previously accepted and used in practice",
|
||||||
|
@future_incompatible = FutureIncompatibleInfo {
|
||||||
|
reference: "issue #57571 <https://github.com/rust-lang/rust/issues/57571>",
|
||||||
|
edition: None,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
declare_lint! {
|
||||||
|
pub META_VARIABLE_MISUSE,
|
||||||
|
Allow,
|
||||||
|
"possible meta-variable misuse at macro definition"
|
||||||
|
}
|
||||||
|
|
||||||
|
declare_lint! {
|
||||||
|
pub INCOMPLETE_INCLUDE,
|
||||||
|
Deny,
|
||||||
|
"trailing content in included file"
|
||||||
|
}
|
||||||
|
|
||||||
declare_lint! {
|
declare_lint! {
|
||||||
pub EXCEEDING_BITSHIFTS,
|
pub EXCEEDING_BITSHIFTS,
|
|
@ -3,28 +3,6 @@
|
||||||
//! Since we cannot have a dependency on `librustc`, we implement some types here that are somewhat
|
//! Since we cannot have a dependency on `librustc`, we implement some types here that are somewhat
|
||||||
//! redundant. Later, these types can be converted to types for use by the rest of the compiler.
|
//! redundant. Later, these types can be converted to types for use by the rest of the compiler.
|
||||||
|
|
||||||
use rustc_session::declare_lint;
|
pub use rustc_session::lint::builtin::ILL_FORMED_ATTRIBUTE_INPUT;
|
||||||
|
pub use rustc_session::lint::builtin::{INCOMPLETE_INCLUDE, META_VARIABLE_MISUSE};
|
||||||
pub use rustc_session::lint::BufferedEarlyLint;
|
pub use rustc_session::lint::BufferedEarlyLint;
|
||||||
use rustc_session::lint::FutureIncompatibleInfo;
|
|
||||||
|
|
||||||
declare_lint! {
|
|
||||||
pub ILL_FORMED_ATTRIBUTE_INPUT,
|
|
||||||
Deny,
|
|
||||||
"ill-formed attribute inputs that were previously accepted and used in practice",
|
|
||||||
@future_incompatible = FutureIncompatibleInfo {
|
|
||||||
reference: "issue #57571 <https://github.com/rust-lang/rust/issues/57571>",
|
|
||||||
edition: None,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
declare_lint! {
|
|
||||||
pub META_VARIABLE_MISUSE,
|
|
||||||
Allow,
|
|
||||||
"possible meta-variable misuse at macro definition"
|
|
||||||
}
|
|
||||||
|
|
||||||
declare_lint! {
|
|
||||||
pub INCOMPLETE_INCLUDE,
|
|
||||||
Deny,
|
|
||||||
"trailing content in included file"
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue