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
|
@ -83,7 +83,7 @@ pub struct UnknownToolInScopedLint {
|
|||
pub struct BuiltinEllpisisInclusiveRangePatterns {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
#[suggestion_short(code = "{replace}", applicability = "machine-applicable")]
|
||||
#[suggestion(style = "short", code = "{replace}", applicability = "machine-applicable")]
|
||||
pub suggestion: Span,
|
||||
pub replace: String,
|
||||
}
|
||||
|
|
|
@ -150,8 +150,9 @@ struct OpaqueHiddenInferredBoundLint<'tcx> {
|
|||
}
|
||||
|
||||
#[derive(Subdiagnostic)]
|
||||
#[suggestion_verbose(
|
||||
#[suggestion(
|
||||
lint_opaque_hidden_inferred_bound_sugg,
|
||||
style = "verbose",
|
||||
applicability = "machine-applicable",
|
||||
code = " + {trait_ref}"
|
||||
)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue