Added checks for attribute in type case
This commit is contained in:
@@ -1489,6 +1489,34 @@ pub(crate) struct AttributeOnParamType {
|
||||
pub span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parse_attribute_on_type)]
|
||||
pub(crate) struct AttributeOnType {
|
||||
#[primary_span]
|
||||
#[label]
|
||||
pub span: Span,
|
||||
#[suggestion(code = "", applicability = "machine-applicable", style = "tool-only")]
|
||||
pub fix_span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parse_attribute_on_generic_arg)]
|
||||
pub(crate) struct AttributeOnGenericArg {
|
||||
#[primary_span]
|
||||
#[label]
|
||||
pub span: Span,
|
||||
#[suggestion(code = "", applicability = "machine-applicable", style = "tool-only")]
|
||||
pub fix_span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parse_attribute_on_empty_type)]
|
||||
pub(crate) struct AttributeOnEmptyType {
|
||||
#[primary_span]
|
||||
#[label]
|
||||
pub span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parse_pattern_method_param_without_body, code = E0642)]
|
||||
pub(crate) struct PatternMethodParamWithoutBody {
|
||||
|
||||
Reference in New Issue
Block a user