Emit the usages suggestions as tool-only suggestions
This commit is contained in:
@@ -1349,7 +1349,7 @@ pub(crate) struct NonUpperCaseGlobal<'a> {
|
||||
#[subdiagnostic]
|
||||
pub sub: NonUpperCaseGlobalSub,
|
||||
#[subdiagnostic]
|
||||
pub usages: Vec<NonUpperCaseGlobalSub>,
|
||||
pub usages: Vec<NonUpperCaseGlobalSubTool>,
|
||||
}
|
||||
|
||||
#[derive(Subdiagnostic)]
|
||||
@@ -1367,6 +1367,19 @@ pub(crate) enum NonUpperCaseGlobalSub {
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Subdiagnostic)]
|
||||
#[suggestion(
|
||||
lint_suggestion,
|
||||
code = "{replace}",
|
||||
applicability = "maybe-incorrect",
|
||||
style = "tool-only"
|
||||
)]
|
||||
pub(crate) struct NonUpperCaseGlobalSubTool {
|
||||
#[primary_span]
|
||||
pub(crate) span: Span,
|
||||
pub(crate) replace: String,
|
||||
}
|
||||
|
||||
// noop_method_call.rs
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(lint_noop_method_call)]
|
||||
|
||||
Reference in New Issue
Block a user