LintContext::opt_span_diag_lint
LintContext::emit_diag_lint
rustc_query_system
For more information about how rustc works, see the rustc dev guide.