Move "elided lifetime in path" to subdiagnostic struct

This requires nested subdiagnostics.
This commit is contained in:
Xiretza 2024-04-20 13:21:15 +00:00
parent b220b741c6
commit 6974e9cf70
5 changed files with 40 additions and 33 deletions

View file

@ -348,3 +348,11 @@ pub struct IndicateAnonymousLifetime {
pub count: usize,
pub suggestion: String,
}
#[derive(Subdiagnostic)]
pub struct ElidedLifetimeInPathSubdiag {
#[subdiagnostic]
pub expected: ExpectedLifetimeParameter,
#[subdiagnostic]
pub indicate: Option<IndicateAnonymousLifetime>,
}