rust/compiler/rustc_parse/src
Nicholas Nethercote f5459201e0 Add EmitResult associated type to EmissionGuarantee.
This lets different error levels share the same return type from
`emit_*`.

- A lot of inconsistencies in the `DiagCtxt` API are removed.
- `Noted` is removed.
- `FatalAbort` is introduced for fatal errors (abort via `raise`),
  replacing the `EmissionGuarantee` impl for `!`.
- `Bug` is renamed `BugAbort` (to avoid clashing with `Level::Bug` and
  to mirror `FatalAbort`), and modified to work in the new way with bug
  errors (abort via panic).
- Various diagnostic creators and emitters updated to the new, better
  signatures. Note that `DiagCtxt::bug` no longer needs to call
  `panic_any`, because `emit` handles that.

Also shorten the obnoxiously long
`diagnostic_builder_emit_producing_guarantee` name.
2023-12-19 09:52:02 +11:00
..
lexer Add EmitResult associated type to EmissionGuarantee. 2023-12-19 09:52:02 +11:00
parser Use .into_diagnostic() less. 2023-12-18 20:46:13 +11:00
errors.rs Add level arg to into_diagnostic. 2023-12-19 09:19:25 +11:00
lib.rs Rename ParseSess::span_diagnostic as ParseSess::dcx. 2023-12-18 16:06:21 +11:00
validate_attr.rs Rename ParseSess::span_diagnostic as ParseSess::dcx. 2023-12-18 16:06:21 +11:00