Struct rustc_driver::LintStore [−][src]
pub(crate) struct LintStore {
lints: Vec<&'static Lint, Global>,
pub pre_expansion_passes: Vec<Box<dyn Fn() + Sync + Send + 'static, Global>, Global>,
pub early_passes: Vec<Box<dyn Fn() + Sync + Send + 'static, Global>, Global>,
pub late_passes: Vec<Box<dyn Fn() + Sync + Send + 'static, Global>, Global>,
pub late_module_passes: Vec<Box<dyn Fn() + Sync + Send + 'static, Global>, Global>,
by_name: HashMap<String, TargetLint, BuildHasherDefault<FxHasher>>,
lint_groups: HashMap<&'static str, LintGroup, BuildHasherDefault<FxHasher>>,
}Expand description
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, Global>Registered lints.
pre_expansion_passes: Vec<Box<dyn Fn() + Sync + Send + 'static, Global>, Global>Constructor functions for each variety of lint pass.
These should only be called once, but since we want to avoid locks or interior mutability, we don’t enforce this (and lints should, in theory, be compatible with being constructed more than once, though not necessarily in a sane manner. This is safe though.)
early_passes: Vec<Box<dyn Fn() + Sync + Send + 'static, Global>, Global>late_passes: Vec<Box<dyn Fn() + Sync + Send + 'static, Global>, Global>late_module_passes: Vec<Box<dyn Fn() + Sync + Send + 'static, Global>, Global>This is unique in that we construct them per-module, so not once.
by_name: HashMap<String, TargetLint, BuildHasherDefault<FxHasher>>Lints indexed by name.
lint_groups: HashMap<&'static str, LintGroup, BuildHasherDefault<FxHasher>>Map of registered lint groups to what lints they expand to.
Auto Trait Implementations
impl !RefUnwindSafe for LintStore
impl !UnwindSafe for LintStore
Blanket Implementations
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 184 bytes