diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-01-10 15:00:20 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-01-11 16:55:10 +1100 |
| commit | 552bed8048d09fc313450f57430da29be94945f4 (patch) | |
| tree | 0dba33edd685146bb909a1289c1051e498b2d965 /tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs | |
| parent | a0f5431e2385c08e40eb8c549249f4e94b32318c (diff) | |
| download | rust-552bed8048d09fc313450f57430da29be94945f4.tar.gz rust-552bed8048d09fc313450f57430da29be94945f4.zip | |
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.
Diffstat (limited to 'tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions
