Struct rustc_lint::EarlyContext
source · [−]pub struct EarlyContext<'a> {
pub builder: LintLevelsBuilder<'a>,
pub buffered: LintBuffer,
}Expand description
Context for lint checking of the AST, after expansion, before lowering to HIR.
Fields
builder: LintLevelsBuilder<'a>buffered: LintBufferImplementations
sourceimpl<'a> EarlyContext<'a>
impl<'a> EarlyContext<'a>
pub(crate) fn new(
sess: &'a Session,
warn_about_weird_lints: bool,
lint_store: &'a LintStore,
registered_tools: &'a RegisteredTools,
buffered: LintBuffer
) -> EarlyContext<'a>
Trait Implementations
sourceimpl LintContext for EarlyContext<'_>
impl LintContext for EarlyContext<'_>
type PassObject = Box<dyn EarlyLintPass + Send + Sync + 'static>
fn lints(&self) -> &LintStore
fn lookup<S: Into<MultiSpan>>(
&self,
lint: &'static Lint,
span: Option<S>,
decorate: impl for<'a> FnOnce(LintDiagnosticBuilder<'a>)
)
fn lookup_with_diagnostics(
&self,
lint: &'static Lint,
span: Option<impl Into<MultiSpan>>,
decorate: impl for<'a> FnOnce(LintDiagnosticBuilder<'a>),
diagnostic: BuiltinLintDiagnostics
)
fn struct_span_lint<S: Into<MultiSpan>>(
&self,
lint: &'static Lint,
span: S,
decorate: impl for<'a> FnOnce(LintDiagnosticBuilder<'a>)
)
sourcefn lint(
&self,
lint: &'static Lint,
decorate: impl for<'a> FnOnce(LintDiagnosticBuilder<'a>)
)
fn lint(
&self,
lint: &'static Lint,
decorate: impl for<'a> FnOnce(LintDiagnosticBuilder<'a>)
)
Emit a lint at the appropriate level, with no associated span.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for EarlyContext<'a>
impl<'a> !Send for EarlyContext<'a>
impl<'a> !Sync for EarlyContext<'a>
impl<'a> Unpin for EarlyContext<'a>
impl<'a> !UnwindSafe for EarlyContext<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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: 128 bytes