Print all labels, even if they have no span. Fall back to main item's span.

This commit is contained in:
Oli Scherer 2022-11-04 16:04:47 +00:00
parent 21ce58732b
commit df2adc4760
11 changed files with 110 additions and 51 deletions

View file

@ -81,6 +81,7 @@ pub struct AttrShouldBeAppliedToFn {
pub attr_span: Span,
#[label]
pub defn_span: Span,
pub on_crate: bool,
}
#[derive(Diagnostic)]
@ -97,6 +98,7 @@ pub struct TrackedCallerWrongLocation {
pub attr_span: Span,
#[label]
pub defn_span: Span,
pub on_crate: bool,
}
#[derive(Diagnostic)]
@ -367,6 +369,7 @@ pub struct MustNotSuspend {
pub struct Cold {
#[label]
pub span: Span,
pub on_crate: bool,
}
#[derive(LintDiagnostic)]