diff options
| author | Xiretza <xiretza@xiretza.xyz> | 2022-10-22 15:48:55 +0200 |
|---|---|---|
| committer | Xiretza <xiretza@xiretza.xyz> | 2022-10-26 15:04:09 +0200 |
| commit | cd621be7821834e5322f0acfb9a7826d4397401d (patch) | |
| tree | cf852b2f6d6aa52c748f32a25d7b2b7df64c102e /compiler/rustc_lint | |
| parent | 20f2958b8af32dd08173272a7ede09aaa255c980 (diff) | |
| download | rust-cd621be7821834e5322f0acfb9a7826d4397401d.tar.gz rust-cd621be7821834e5322f0acfb9a7826d4397401d.zip | |
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' \
'{}' +
Diffstat (limited to 'compiler/rustc_lint')
| -rw-r--r-- | compiler/rustc_lint/src/errors.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_lint/src/errors.rs b/compiler/rustc_lint/src/errors.rs index a49d1bdacc2..1a769893f55 100644 --- a/compiler/rustc_lint/src/errors.rs +++ b/compiler/rustc_lint/src/errors.rs @@ -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, } diff --git a/compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs b/compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs index 7f6f4a0abb4..25ee0227428 100644 --- a/compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs +++ b/compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs @@ -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}" )] |
