pub fn diag_lint_level<'a, D: Diagnostic<'a, ()> + 'a>(
sess: &'a Session,
lint: &'static Lint,
level: LevelAndSource,
span: Option<MultiSpan>,
decorate: D,
)Expand description
The innermost function for emitting lints implementing the Diagnostic trait.
If you are looking to implement a lint, look for higher level functions, for example:
TyCtxt::emit_node_span_lintTyCtxt::node_span_lintTyCtxt::node_lintLintContext::opt_span_lint
This function will replace lint_level once all its callers have been replaced
with diag_lint_level.