Suggest assoc ty bound on lifetime in eq constraint

This commit is contained in:
León Orell Valerian Liehr 2024-03-06 23:49:05 +01:00
parent 22b9e960d9
commit 3879acbec0
No known key found for this signature in database
GPG key ID: D17A07215F68E713
5 changed files with 49 additions and 21 deletions

View file

@ -2611,13 +2611,22 @@ pub(crate) struct GenericsInPath {
}
#[derive(Diagnostic)]
#[diag(parse_assoc_lifetime)]
#[diag(parse_lifetime_in_eq_constraint)]
#[help]
pub(crate) struct AssocLifetime {
pub(crate) struct LifetimeInEqConstraint {
#[primary_span]
pub span: Span,
#[label]
pub lifetime: Span,
pub span: Span,
pub lifetime: Ident,
#[label(parse_context_label)]
pub binding_label: Span,
#[suggestion(
parse_colon_sugg,
style = "verbose",
applicability = "maybe-incorrect",
code = ": "
)]
pub colon_sugg: Span,
}
#[derive(Diagnostic)]