Use verbose style when suggesting changing const with let

This commit is contained in:
Esteban Küber 2024-07-05 19:32:17 +00:00
parent bcf1f6db45
commit b56dc8ee90
20 changed files with 153 additions and 82 deletions

View file

@ -242,13 +242,13 @@ pub(crate) struct AttemptToUseNonConstantValueInConstant<'a> {
#[derive(Subdiagnostic)]
#[suggestion(
resolve_attempt_to_use_non_constant_value_in_constant_with_suggestion,
code = "{suggestion} {ident}",
code = "{suggestion} ",
style = "verbose",
applicability = "maybe-incorrect"
)]
pub(crate) struct AttemptToUseNonConstantValueInConstantWithSuggestion<'a> {
#[primary_span]
pub(crate) span: Span,
pub(crate) ident: Ident,
pub(crate) suggestion: &'a str,
pub(crate) current: &'a str,
}