Trait rustc::lint::LintContext [] [src]

pub trait LintContext<'tcx>: Sized {
    type PassObject: LintPassObject;
    fn sess(&self) -> &Session;
fn lints(&self) -> &LintStore;
fn lint_sess(&self) -> &LintSession<'tcx, Self::PassObject>;
fn lint_sess_mut(&mut self) -> &mut LintSession<'tcx, Self::PassObject>;
fn enter_attrs(&mut self, attrs: &'tcx [Attribute]);
fn exit_attrs(&mut self, attrs: &'tcx [Attribute]);
fn lookup<S: Into<MultiSpan>>(
        &self,
        lint: &'static Lint,
        span: Option<S>,
        msg: &str
    ) -> DiagnosticBuilder;
fn with_lint_attrs<F>(&mut self, id: NodeId, attrs: &'tcx [Attribute], f: F)
    where
        F: FnOnce(&mut Self)
; fn lookup_and_emit<S: Into<MultiSpan>>(
        &self,
        lint: &'static Lint,
        span: Option<S>,
        msg: &str
    ) { ... }
fn span_lint<S: Into<MultiSpan>>(
        &self,
        lint: &'static Lint,
        span: S,
        msg: &str
    ) { ... }
fn struct_span_lint<S: Into<MultiSpan>>(
        &self,
        lint: &'static Lint,
        span: S,
        msg: &str
    ) -> DiagnosticBuilder { ... }
fn span_lint_note(
        &self,
        lint: &'static Lint,
        span: Span,
        msg: &str,
        note_span: Span,
        note: &str
    ) { ... }
fn span_lint_help(
        &self,
        lint: &'static Lint,
        span: Span,
        msg: &str,
        help: &str
    ) { ... }
fn lint(&self, lint: &'static Lint, msg: &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?

Associated Types

🔬 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?

Required Methods

🔬 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?

🔬 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?

🔬 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?

🔬 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?

🔬 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?

🔬 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?

🔬 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?

🔬 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?

Merge the lints specified by any lint attributes into the current lint context, call the provided function, then reset the lints in effect to their previous state.

Provided Methods

🔬 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?

🔬 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?

Emit a lint at the appropriate level, for a particular span.

🔬 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?

🔬 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?

Emit a lint and note at the appropriate level, for a particular span.

🔬 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?

Emit a lint and help at the appropriate level, for a particular span.

🔬 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?

Emit a lint at the appropriate level, with no associated span.

Implementors