1
Fork 0

Add SubdiagnosticMessageOp as a trait alias.

It avoids a lot of repetition.
This commit is contained in:
Nicholas Nethercote 2024-02-06 16:35:19 +11:00
parent 0d531351e8
commit 6b175a848d
19 changed files with 68 additions and 181 deletions

View file

@ -89,10 +89,7 @@ impl SubdiagnosticDeriveBuilder {
gen impl rustc_errors::AddToDiagnostic for @Self {
fn add_to_diagnostic_with<__F>(self, #diag: &mut rustc_errors::Diagnostic, #f: __F)
where
__F: core::ops::Fn(
&mut rustc_errors::Diagnostic,
rustc_errors::SubdiagnosticMessage
) -> rustc_errors::SubdiagnosticMessage,
__F: rustc_errors::SubdiagnosticMessageOp,
{
#implementation
}