rust/compiler/rustc_errors/src
Matthias Krüger f511f2b18d
Rollup merge of #126719 - nnethercote:fix-126521, r=oli-obk
Fix assertion failure for some `Expect` diagnostics.

In #120699 I moved some code dealing with `has_future_breakage` earlier in `emit_diagnostic`. Issue #126521 identified a case where that reordering was invalid (leading to an assertion failure) for some `Expect` diagnostics.

This commit partially undoes the change, by moving the handling of unstable `Expect` diagnostics earlier again. This makes `emit_diagnostic` a bit uglier, but is necessary to fix the problem.

Fixes #126521.

r? ``@oli-obk``
2024-06-20 14:07:04 +02:00
..
json Use a dedicated type instead of a reference for the diagnostic context 2024-06-18 15:42:11 +00:00
markdown Add blank lines after module-level //! comments. 2024-06-20 09:23:20 +10:00
annotate_snippet_emitter_writer.rs Rename DiagnosticMessage as DiagMessage. 2024-03-05 12:14:49 +11:00
codes.rs Stop using String for error codes. 2024-01-29 07:41:41 +11:00
diagnostic_impls.rs Use a dedicated type instead of a reference for the diagnostic context 2024-06-18 15:42:11 +00:00
diagnostic.rs Remove redundant argument from subdiagnostic method 2024-06-18 15:42:11 +00:00
emitter.rs Use a dedicated type instead of a reference for the diagnostic context 2024-06-18 15:42:11 +00:00
error.rs Minor visibility and formatting improvements. 2024-02-29 16:30:09 +11:00
json.rs If suggestion would leave an empty line, delete it 2024-03-01 13:48:20 +00:00
lib.rs Fix assertion failure for some Expect diagnostics. 2024-06-20 10:17:40 +10:00
lock.rs windows bump to 0.52 2024-02-18 16:02:16 +03:00
registry.rs Stop using String for error codes. 2024-01-29 07:41:41 +11:00
snippet.rs Remove extern crate rustc_macros from numerous crates. 2024-04-29 10:21:54 +10:00
styled_buffer.rs Replace some _ == _ || _ == _s with matches!(_, _ | _)s 2023-01-30 12:26:26 +00:00
tests.rs Rename DiagnosticMessage as DiagMessage. 2024-03-05 12:14:49 +11:00
translation.rs Remove extern crate tracing from numerous crates. 2024-04-30 16:47:49 +10:00