Struct rustc::lint::LintStore [−][src]
pub struct LintStore { lints: Vec<(&'static Lint, bool)>, early_passes: Option<Vec<EarlyLintPassObject>>, late_passes: Option<Vec<LateLintPassObject>>, by_name: FxHashMap<String, TargetLint>, lint_groups: FxHashMap<&'static str, (Vec<LintId>, bool)>, future_incompatible: FxHashMap<LintId, FutureIncompatibleInfo>, }
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Information about the registered lints.
This is basically the subset of Context
that we can
build early in the compile pipeline.
Fields
lints: Vec<(&'static Lint, bool)>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Registered lints. The bool is true if the lint was added by a plugin.
early_passes: Option<Vec<EarlyLintPassObject>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Trait objects for each lint pass.
This is only None
while performing a lint pass. See the definition
of LintSession::new
.
late_passes: Option<Vec<LateLintPassObject>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
by_name: FxHashMap<String, TargetLint>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Lints indexed by name.
lint_groups: FxHashMap<&'static str, (Vec<LintId>, bool)>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Map of registered lint groups to what lints they expand to. The bool is true if the lint group was added by a plugin.
future_incompatible: FxHashMap<LintId, FutureIncompatibleInfo>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Extra info for future incompatibility lints, describing the issue or RFC that caused the incompatibility.
Methods
impl LintStore
[src]
impl LintStore
pub fn new() -> LintStore
[src]
pub fn new() -> LintStore
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_lints<'t>(&'t self) -> &'t [(&'static Lint, bool)]
[src]
pub fn get_lints<'t>(&'t self) -> &'t [(&'static Lint, bool)]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_lint_groups<'t>(&'t self) -> Vec<(&'static str, Vec<LintId>, bool)>
[src]
pub fn get_lint_groups<'t>(&'t self) -> Vec<(&'static str, Vec<LintId>, bool)>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn register_early_pass(
&mut self,
sess: Option<&Session>,
from_plugin: bool,
pass: EarlyLintPassObject
)
[src]
pub fn register_early_pass(
&mut self,
sess: Option<&Session>,
from_plugin: bool,
pass: EarlyLintPassObject
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn register_late_pass(
&mut self,
sess: Option<&Session>,
from_plugin: bool,
pass: LateLintPassObject
)
[src]
pub fn register_late_pass(
&mut self,
sess: Option<&Session>,
from_plugin: bool,
pass: LateLintPassObject
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn push_pass<P: LintPass + ?Sized + 'static>(
&mut self,
sess: Option<&Session>,
from_plugin: bool,
pass: &Box<P>
)
[src]
fn push_pass<P: LintPass + ?Sized + 'static>(
&mut self,
sess: Option<&Session>,
from_plugin: bool,
pass: &Box<P>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn register_future_incompatible(
&mut self,
sess: Option<&Session>,
lints: Vec<FutureIncompatibleInfo>
)
[src]
pub fn register_future_incompatible(
&mut self,
sess: Option<&Session>,
lints: Vec<FutureIncompatibleInfo>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn future_incompatible(&self, id: LintId) -> Option<&FutureIncompatibleInfo>
[src]
pub fn future_incompatible(&self, id: LintId) -> Option<&FutureIncompatibleInfo>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn register_group(
&mut self,
sess: Option<&Session>,
from_plugin: bool,
name: &'static str,
to: Vec<LintId>
)
[src]
pub fn register_group(
&mut self,
sess: Option<&Session>,
from_plugin: bool,
name: &'static str,
to: Vec<LintId>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn register_renamed(&mut self, old_name: &str, new_name: &str)
[src]
pub fn register_renamed(&mut self, old_name: &str, new_name: &str)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn register_removed(&mut self, name: &str, reason: &str)
[src]
pub fn register_removed(&mut self, name: &str, reason: &str)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn find_lints(&self, lint_name: &str) -> Result<Vec<LintId>, FindLintError>
[src]
pub fn find_lints(&self, lint_name: &str) -> Result<Vec<LintId>, FindLintError>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn check_lint_name_cmdline(
&self,
sess: &Session,
lint_name: &str,
level: Level
)
[src]
pub fn check_lint_name_cmdline(
&self,
sess: &Session,
lint_name: &str,
level: Level
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Checks the validity of lint names derived from the command line
pub fn check_lint_name(&self, lint_name: &str) -> CheckLintNameResult
[src]
pub fn check_lint_name(&self, lint_name: &str) -> CheckLintNameResult
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Checks the name of a lint for its existence, and whether it was renamed or removed. Generates a DiagnosticBuilder containing a warning for renamed and removed lints. This is over both lint names from attributes and those passed on the command line. Since it emits non-fatal warnings and there are two lint passes that inspect attributes, this is only run from the late pass to avoid printing duplicate warnings.