Convert all #[suggestion_*] attributes to #[suggestion(style = "...")]
Using the following command: find compiler/ -type f -name '*.rs' -exec perl -i -gpe \ 's/(#\[\w*suggestion)_(short|verbose|hidden)\(\s*(\S+,)?/\1(\3style = "\2",/g' \ '{}' +
This commit is contained in:
parent
20f2958b8a
commit
cd621be782
10 changed files with 73 additions and 38 deletions
|
@ -120,7 +120,7 @@ pub struct TypeofReservedKeywordUsed<'tcx> {
|
|||
#[primary_span]
|
||||
#[label]
|
||||
pub span: Span,
|
||||
#[suggestion_verbose(code = "{ty}")]
|
||||
#[suggestion(style = "verbose", code = "{ty}")]
|
||||
pub opt_sugg: Option<(Span, Applicability)>,
|
||||
}
|
||||
|
||||
|
@ -237,7 +237,11 @@ pub struct UnusedExternCrate {
|
|||
#[derive(LintDiagnostic)]
|
||||
#[diag(hir_analysis_extern_crate_not_idiomatic)]
|
||||
pub struct ExternCrateNotIdiomatic {
|
||||
#[suggestion_short(applicability = "machine-applicable", code = "{suggestion_code}")]
|
||||
#[suggestion(
|
||||
style = "short",
|
||||
applicability = "machine-applicable",
|
||||
code = "{suggestion_code}"
|
||||
)]
|
||||
pub span: Span,
|
||||
pub msg_code: String,
|
||||
pub suggestion_code: String,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue