Add SubdiagnosticMessageOp as a trait alias.
It avoids a lot of repetition.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user