misapplied optimize attribute throws a compilation error (#128488)
This commit is contained in:
@@ -76,9 +76,15 @@ pub(crate) struct CoverageNotFnOrClosure {
|
||||
pub defn_span: Span,
|
||||
}
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(passes_optimize_not_fn_or_closure)]
|
||||
pub(crate) struct OptimizeNotFnOrClosure;
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(passes_optimize_invalid_target)]
|
||||
pub(crate) struct OptimizeInvalidTarget {
|
||||
#[primary_span]
|
||||
pub attr_span: Span,
|
||||
#[label]
|
||||
pub defn_span: Span,
|
||||
pub on_crate: bool,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(passes_should_be_applied_to_fn)]
|
||||
|
||||
Reference in New Issue
Block a user