1
Fork 0

Rollup merge of #121427 - nnethercote:fix-Rocket, r=oli-obk

Fix panic when compiling `Rocket`.

This panic was reported [here](https://github.com/rust-lang/rust/pull/120576#issuecomment-1957515484).

r? ``@oli-obk``
This commit is contained in:
Matthias Krüger 2024-02-22 18:09:54 +01:00 committed by GitHub
commit 01ec4eb319
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 13 additions and 11 deletions

View file

@ -461,8 +461,10 @@ pub(crate) struct NonExhaustivePatternsTypeNotEmpty<'p, 'tcx, 'm> {
pub ty: Ty<'tcx>,
}
impl<'a> IntoDiagnostic<'a> for NonExhaustivePatternsTypeNotEmpty<'_, '_, '_> {
fn into_diagnostic(self, dcx: &'a DiagCtxt, level: Level) -> DiagnosticBuilder<'_> {
impl<'a, G: EmissionGuarantee> IntoDiagnostic<'a, G>
for NonExhaustivePatternsTypeNotEmpty<'_, '_, '_>
{
fn into_diagnostic(self, dcx: &'a DiagCtxt, level: Level) -> DiagnosticBuilder<'_, G> {
let mut diag = DiagnosticBuilder::new(
dcx,
level,