os-rust/compiler/rustc_expand
Nicholas Nethercote 326b44e4d3 Fix panic when compiling Rocket.
`Rustc::emit_diagnostic` reconstructs a diagnostic passed in from the
macro machinery. Currently it uses the type `DiagnosticBuilder<'_,
ErrorGuaranteed>`, which is incorrect, because the diagnostic might be a
warning. And if it is a warning, because of the `ErrorGuaranteed` we end
up calling into `emit_producing_error_guaranteed` and the assertion
within that function (correctly) fails because the level is not an error
level.

The fix is simple: change the type to `DiagnosticBuilder<'_, ()>`. Using
`()` works no matter what the diagnostic level is, and we don't need an
`ErrorGuaranteed` here.

The panic was reported in #120576.
2024-02-22 13:46:33 +11:00
..
src Fix panic when compiling Rocket. 2024-02-22 13:46:33 +11:00
Cargo.toml Remove crossbeam-channel 2024-01-07 19:16:13 -05:00
messages.ftl Rollup merge of #121288 - tshepang:make-expand-translatable, r=michaelwoerister 2024-02-21 08:55:56 +00:00