[−][src]Trait rustc::lint::LintContext
🔬 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
type PassObject: LintPassObject
🔬 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
fn sess(&self) -> &Session
🔬 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 lints(&self) -> &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?
fn lint_sess(&self) -> &LintSession<'tcx, Self::PassObject>
🔬 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 lint_sess_mut(&mut self) -> &mut LintSession<'tcx, Self::PassObject>
🔬 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 enter_attrs(&mut self, attrs: &'tcx [Attribute])
🔬 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 exit_attrs(&mut self, attrs: &'tcx [Attribute])
🔬 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 lookup<S: Into<MultiSpan>>(
&self,
lint: &'static Lint,
span: Option<S>,
msg: &str
) -> DiagnosticBuilder
&self,
lint: &'static Lint,
span: Option<S>,
msg: &str
) -> DiagnosticBuilder
🔬 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 with_lint_attrs<F>(&mut self, id: NodeId, attrs: &'tcx [Attribute], f: F) where
F: FnOnce(&mut Self),
F: FnOnce(&mut Self),
🔬 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
fn lookup_and_emit<S: Into<MultiSpan>>(
&self,
lint: &'static Lint,
span: Option<S>,
msg: &str
)
&self,
lint: &'static Lint,
span: Option<S>,
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?
fn lookup_and_emit_with_diagnostics<S: Into<MultiSpan>>(
&self,
lint: &'static Lint,
span: Option<S>,
msg: &str,
diagnostic: BuiltinLintDiagnostics
)
&self,
lint: &'static Lint,
span: Option<S>,
msg: &str,
diagnostic: BuiltinLintDiagnostics
)
🔬 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 span_lint<S: Into<MultiSpan>>(&self, lint: &'static Lint, span: S, 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?
Emit a lint at the appropriate level, for a particular span.
fn struct_span_lint<S: Into<MultiSpan>>(
&self,
lint: &'static Lint,
span: S,
msg: &str
) -> DiagnosticBuilder
&self,
lint: &'static Lint,
span: S,
msg: &str
) -> DiagnosticBuilder
🔬 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 span_lint_note(
&self,
lint: &'static Lint,
span: Span,
msg: &str,
note_span: Span,
note: &str
)
&self,
lint: &'static Lint,
span: Span,
msg: &str,
note_span: Span,
note: &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?
Emit a lint and note at the appropriate level, for a particular span.
fn span_lint_help(&self, lint: &'static Lint, span: Span, msg: &str, help: &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?
Emit a lint and help at the appropriate level, for a particular span.
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?
Emit a lint at the appropriate level, with no associated span.
Implementors
impl<'a> LintContext<'a> for EarlyContext<'a>
[src]
impl<'a> LintContext<'a> for EarlyContext<'a>
type PassObject = 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?
fn sess(&self) -> &Session
[src]
fn sess(&self) -> &Session
🔬 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?
Get the overall compiler Session
object.
fn lints(&self) -> &LintStore
[src]
fn lints(&self) -> &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?
fn lint_sess(&self) -> &LintSession<'a, Self::PassObject>
[src]
fn lint_sess(&self) -> &LintSession<'a, Self::PassObject>
🔬 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 lint_sess_mut(&mut self) -> &mut LintSession<'a, Self::PassObject>
[src]
fn lint_sess_mut(&mut self) -> &mut LintSession<'a, Self::PassObject>
🔬 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 enter_attrs(&mut self, attrs: &'a [Attribute])
[src]
fn enter_attrs(&mut self, attrs: &'a [Attribute])
🔬 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 exit_attrs(&mut self, attrs: &'a [Attribute])
[src]
fn exit_attrs(&mut self, attrs: &'a [Attribute])
🔬 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 lookup<S: Into<MultiSpan>>(
&self,
lint: &'static Lint,
span: Option<S>,
msg: &str
) -> DiagnosticBuilder
[src]
fn lookup<S: Into<MultiSpan>>(
&self,
lint: &'static Lint,
span: Option<S>,
msg: &str
) -> DiagnosticBuilder
🔬 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 with_lint_attrs<F>(&mut self, id: NodeId, attrs: &'a [Attribute], f: F) where
F: FnOnce(&mut Self),
[src]
fn with_lint_attrs<F>(&mut self, id: NodeId, attrs: &'a [Attribute], f: F) where
F: FnOnce(&mut Self),
🔬 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 lookup_and_emit<S: Into<MultiSpan>>(
&self,
lint: &'static Lint,
span: Option<S>,
msg: &str
)
[src]
fn lookup_and_emit<S: Into<MultiSpan>>(
&self,
lint: &'static Lint,
span: Option<S>,
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?
fn lookup_and_emit_with_diagnostics<S: Into<MultiSpan>>(
&self,
lint: &'static Lint,
span: Option<S>,
msg: &str,
diagnostic: BuiltinLintDiagnostics
)
[src]
fn lookup_and_emit_with_diagnostics<S: Into<MultiSpan>>(
&self,
lint: &'static Lint,
span: Option<S>,
msg: &str,
diagnostic: BuiltinLintDiagnostics
)
🔬 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 span_lint<S: Into<MultiSpan>>(&self, lint: &'static Lint, span: S, msg: &str)
[src]
fn span_lint<S: Into<MultiSpan>>(&self, lint: &'static Lint, span: S, 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?
fn struct_span_lint<S: Into<MultiSpan>>(
&self,
lint: &'static Lint,
span: S,
msg: &str
) -> DiagnosticBuilder
[src]
fn struct_span_lint<S: Into<MultiSpan>>(
&self,
lint: &'static Lint,
span: S,
msg: &str
) -> DiagnosticBuilder
🔬 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 span_lint_note(
&self,
lint: &'static Lint,
span: Span,
msg: &str,
note_span: Span,
note: &str
)
[src]
fn span_lint_note(
&self,
lint: &'static Lint,
span: Span,
msg: &str,
note_span: Span,
note: &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?
fn span_lint_help(&self, lint: &'static Lint, span: Span, msg: &str, help: &str)
[src]
fn span_lint_help(&self, lint: &'static Lint, span: Span, msg: &str, help: &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?
fn lint(&self, lint: &'static Lint, msg: &str)
[src]
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?
impl<'a, 'tcx> LintContext<'tcx> for LateContext<'a, 'tcx>
[src]
impl<'a, 'tcx> LintContext<'tcx> for LateContext<'a, 'tcx>
type PassObject = 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 sess(&self) -> &Session
[src]
fn sess(&self) -> &Session
🔬 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?
Get the overall compiler Session
object.
fn lints(&self) -> &LintStore
[src]
fn lints(&self) -> &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?
fn lint_sess(&self) -> &LintSession<'tcx, Self::PassObject>
[src]
fn lint_sess(&self) -> &LintSession<'tcx, Self::PassObject>
🔬 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 lint_sess_mut(&mut self) -> &mut LintSession<'tcx, Self::PassObject>
[src]
fn lint_sess_mut(&mut self) -> &mut LintSession<'tcx, Self::PassObject>
🔬 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 enter_attrs(&mut self, attrs: &'tcx [Attribute])
[src]
fn enter_attrs(&mut self, attrs: &'tcx [Attribute])
🔬 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 exit_attrs(&mut self, attrs: &'tcx [Attribute])
[src]
fn exit_attrs(&mut self, attrs: &'tcx [Attribute])
🔬 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 lookup<S: Into<MultiSpan>>(
&self,
lint: &'static Lint,
span: Option<S>,
msg: &str
) -> DiagnosticBuilder
[src]
fn lookup<S: Into<MultiSpan>>(
&self,
lint: &'static Lint,
span: Option<S>,
msg: &str
) -> DiagnosticBuilder
🔬 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 with_lint_attrs<F>(&mut self, id: NodeId, attrs: &'tcx [Attribute], f: F) where
F: FnOnce(&mut Self),
[src]
fn with_lint_attrs<F>(&mut self, id: NodeId, attrs: &'tcx [Attribute], f: F) where
F: FnOnce(&mut Self),
🔬 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 lookup_and_emit<S: Into<MultiSpan>>(
&self,
lint: &'static Lint,
span: Option<S>,
msg: &str
)
[src]
fn lookup_and_emit<S: Into<MultiSpan>>(
&self,
lint: &'static Lint,
span: Option<S>,
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?
fn lookup_and_emit_with_diagnostics<S: Into<MultiSpan>>(
&self,
lint: &'static Lint,
span: Option<S>,
msg: &str,
diagnostic: BuiltinLintDiagnostics
)
[src]
fn lookup_and_emit_with_diagnostics<S: Into<MultiSpan>>(
&self,
lint: &'static Lint,
span: Option<S>,
msg: &str,
diagnostic: BuiltinLintDiagnostics
)
🔬 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 span_lint<S: Into<MultiSpan>>(&self, lint: &'static Lint, span: S, msg: &str)
[src]
fn span_lint<S: Into<MultiSpan>>(&self, lint: &'static Lint, span: S, 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?
fn struct_span_lint<S: Into<MultiSpan>>(
&self,
lint: &'static Lint,
span: S,
msg: &str
) -> DiagnosticBuilder
[src]
fn struct_span_lint<S: Into<MultiSpan>>(
&self,
lint: &'static Lint,
span: S,
msg: &str
) -> DiagnosticBuilder
🔬 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 span_lint_note(
&self,
lint: &'static Lint,
span: Span,
msg: &str,
note_span: Span,
note: &str
)
[src]
fn span_lint_note(
&self,
lint: &'static Lint,
span: Span,
msg: &str,
note_span: Span,
note: &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?
fn span_lint_help(&self, lint: &'static Lint, span: Span, msg: &str, help: &str)
[src]
fn span_lint_help(&self, lint: &'static Lint, span: Span, msg: &str, help: &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?
fn lint(&self, lint: &'static Lint, msg: &str)
[src]
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?