1
Fork 0

Disallow ambiguous attributes on expressions

This commit is contained in:
Dominik Stolz 2024-04-17 23:40:03 +02:00
parent 6c6b3027ef
commit 5af861cf7b
15 changed files with 141 additions and 49 deletions

View file

@ -495,6 +495,15 @@ pub(crate) struct OuterAttributeNotAllowedOnIfElse {
pub attributes: Span,
}
#[derive(Diagnostic)]
#[diag(parse_outer_attr_ambiguous)]
pub(crate) struct AmbiguousOuterAttributes {
#[primary_span]
pub span: Span,
#[subdiagnostic]
pub sugg: WrapInParentheses,
}
#[derive(Diagnostic)]
#[diag(parse_missing_in_in_for_loop)]
pub(crate) struct MissingInInForLoop {