1
Fork 0

Rollup merge of #122503 - compiler-errors:trait-alias-wf, r=Nilstrieb

Make `SubdiagMessageOp` well-formed

`WF(Diag<'_, G>)` requires `G: EmissionGuarantee`, but we don't currently check this is true due to limitations in the solver. Probably still worth enforcing.

r? `@nnethercote` (or anyone can r+ this, really)
This commit is contained in:
Matthias Krüger 2024-03-14 20:00:22 +01:00 committed by GitHub
commit 6ce3110ce9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -189,7 +189,8 @@ where
);
}
pub trait SubdiagMessageOp<G> = Fn(&mut Diag<'_, G>, SubdiagMessage) -> SubdiagMessage;
pub trait SubdiagMessageOp<G: EmissionGuarantee> =
Fn(&mut Diag<'_, G>, SubdiagMessage) -> SubdiagMessage;
/// Trait implemented by lint types. This should not be implemented manually. Instead, use
/// `#[derive(LintDiagnostic)]` -- see [rustc_macros::LintDiagnostic].