Files
rust/compiler/rustc_errors
Nicholas Nethercote fcf74ea737 Merge ForceWarning/Allow/Expect into Warning
Because they're all just special cases of warnings. This requires
introducing a new `Option<EmissionOverride>` field to `Warning` that
describes the special case behaviour; the `DiagInner::lint_id` field
also gets merged in.

Specific nice things about this:

- Removes some unreachable match arms for `Allow`/`Expect`.

- Removes the hacky upgrading of `Allow`/`Expect` to `Warning` in
  `emit_future_breakage_report`.

- The types now have structure that used to be maintained by comments
  and assertions. E.g. it's now impossible to not have a `lint_id` for
  an `expect` lint. (I always found the `DiagInner::lint_id` field
  confusing; it's clearer now.)

- There's a nice comment on `EmissionOverride` summarizing all the
  different cases.

- A little less code overall.
2026-09-26 07:47:13 +10:00
..