Trait rustc_trans::lint::LintContext [] [src]

pub trait LintContext<'tcx> {
    fn sess(&self) -> &Session;
    fn lints(&self) -> &LintStore;
    fn mut_lints(&mut self) -> &mut LintStore;
    fn level_stack(&mut self) -> &mut Vec<(LintId, (Level, LintSource))>;
    fn enter_attrs(&mut self, attrs: &'tcx [Attribute]);
    fn exit_attrs(&mut self, attrs: &'tcx [Attribute]);

    fn current_level(&self, lint: &'static Lint) -> Level { ... }
    fn level_src(&self, lint: &'static Lint) -> Option<(Level, LintSource)> { ... }
    fn lookup_and_emit<S>(&self,
                          lint: &'static Lint,
                          span: Option<S>,
                          msg: &str) where S: Into<MultiSpan> { ... } fn lookup<S>(&self,
                 lint: &'static Lint,
                 span: Option<S>,
                 msg: &str)
                 -> DiagnosticBuilder where S: Into<MultiSpan> { ... } fn span_lint<S>(&self, lint: &'static Lint, span: S, msg: &str) where S: Into<MultiSpan> { ... } fn early_lint(&self, early_lint: &EarlyLint) { ... } fn struct_span_lint<S>(&self,
                           lint: &'static Lint,
                           span: S,
                           msg: &str)
                           -> DiagnosticBuilder where S: Into<MultiSpan> { ... } 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) { ... } fn with_lint_attrs<F>(&mut self, attrs: &'tcx [Attribute], f: F) where F: FnOnce(&mut Self) -> () { ... } }
🔬 This is a nightly-only experimental API. (rustc_private)

Required Methods

🔬 This is a nightly-only experimental API. (rustc_private)

🔬 This is a nightly-only experimental API. (rustc_private)

🔬 This is a nightly-only experimental API. (rustc_private)

🔬 This is a nightly-only experimental API. (rustc_private)

🔬 This is a nightly-only experimental API. (rustc_private)

🔬 This is a nightly-only experimental API. (rustc_private)

Provided Methods

🔬 This is a nightly-only experimental API. (rustc_private)

Get the level of lint at the current position of the lint traversal.

🔬 This is a nightly-only experimental API. (rustc_private)

🔬 This is a nightly-only experimental API. (rustc_private)

🔬 This is a nightly-only experimental API. (rustc_private)

🔬 This is a nightly-only experimental API. (rustc_private)

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

🔬 This is a nightly-only experimental API. (rustc_private)

🔬 This is a nightly-only experimental API. (rustc_private)

🔬 This is a nightly-only experimental API. (rustc_private)

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

🔬 This is a nightly-only experimental API. (rustc_private)

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

🔬 This is a nightly-only experimental API. (rustc_private)

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

🔬 This is a nightly-only experimental API. (rustc_private)

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.

Implementors