-
-fn emit_unfulfilled_expectation_lint(
- tcx: TyCtxt<'_>,
- hir_id: HirId,
- expectation: &LintExpectation,
-) {
- tcx.struct_span_lint_hir(
- builtin::UNFULFILLED_LINT_EXPECTATIONS,
- hir_id,
- expectation.emission_span,
- fluent::lint_expectation,
- |lint| {
- if let Some(rationale) = expectation.reason {
- lint.note(rationale.as_str());
- }
-
- if expectation.is_unfulfilled_lint_expectations {
- lint.note(fluent::note);
- }
-
- lint
- },
- );
-}