macros: subdiagnostic derive
Add a new derive, `#[derive(SessionSubdiagnostic)]`, which enables deriving structs for labels, notes, helps and suggestions. Signed-off-by: David Wood <david.wood@huawei.com>
This commit is contained in:
parent
aa2abc9d12
commit
49ec909ca7
10 changed files with 1735 additions and 151 deletions
|
@ -530,6 +530,11 @@ impl<'a, G: EmissionGuarantee> DiagnosticBuilder<'a, G> {
|
|||
name: impl Into<Cow<'static, str>>,
|
||||
arg: DiagnosticArgValue<'static>,
|
||||
) -> &mut Self);
|
||||
|
||||
forward!(pub fn subdiagnostic(
|
||||
&mut self,
|
||||
subdiagnostic: impl crate::AddSubdiagnostic
|
||||
) -> &mut Self);
|
||||
}
|
||||
|
||||
impl<G: EmissionGuarantee> Debug for DiagnosticBuilder<'_, G> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue