rust/compiler/rustc_errors/src
Nicholas Nethercote 552bed8048 Remove DiagnosticBuilder::into_diagnostic from -Ztreat-err-as-bug consideration.
It seems very wrong to have a `-Ztreat-err-as-bug` check here before the
error is even emitted.

Once that's done:
- `into_diagnostic` is infallible, so its return type doesn't need the
  `Option`;
- the `&'a DiagCtxt` also isn't needed, because only one callsite uses
  it, and it already have access to it via `self.dcx`;
- the comments about dcx disabling buffering are no longer true, this is
  unconditional now;
- and the `debug!` seems unnecessary... the comment greatly overstates
  its importance because few diagnostics come through `into_diagnostic`,
  and `-Ztrack-diagnostics` exists anyway.
2024-01-11 16:55:10 +11:00
..
json Rename many DiagCtxt and EarlyDiagCtxt locals. 2023-12-18 16:06:22 +11:00
markdown remove redundant imports 2023-12-10 10:56:22 +08:00
annotate_snippet_emitter_writer.rs Change how force-warn lint diagnostics are recorded. 2024-01-11 07:56:17 +11:00
diagnostic.rs Change how force-warn lint diagnostics are recorded. 2024-01-11 07:56:17 +11:00
diagnostic_builder.rs Remove DiagnosticBuilder::into_diagnostic from -Ztreat-err-as-bug consideration. 2024-01-11 16:55:10 +11:00
diagnostic_impls.rs Rename consuming chaining methods on DiagnosticBuilder. 2024-01-10 07:40:00 +11:00
emitter.rs Add some comments to Emitter. 2024-01-05 10:49:35 +11:00
error.rs Make translate_message return result and add tests 2023-01-08 23:35:43 +01:00
json.rs Change how force-warn lint diagnostics are recorded. 2024-01-11 07:56:17 +11:00
lib.rs Move code around. 2024-01-11 16:55:10 +11:00
lock.rs bump windows crate 0.46 -> 0.48 in workspace 2023-05-09 18:20:13 +03:00
registry.rs refactor: statically guarantee that current error codes are documented 2023-02-26 20:12:36 +13:00
snippet.rs Create AnnotationColumn struct to fix hard tab column numbers in errors 2023-03-28 09:18:55 -04:00
styled_buffer.rs Replace some _ == _ || _ == _s with matches!(_, _ | _)s 2023-01-30 12:26:26 +00:00
tests.rs Format all the let chains in compiler 2023-10-13 08:59:36 +00:00
translation.rs Restore behavior when primary bundle is missing 2023-02-23 01:14:10 +01:00