Rollup merge of #103575 - Xiretza:suggestions-style-attr, r=davidtwco
Change #[suggestion_*] attributes to use style="..." As discussed [on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/336883-i18n/topic/.23100717.20tool_only_span_suggestion), this changes `#[(multipart_)suggestion_{short,verbose,hidden}(...)]` attributes to plain `#[(multipart_)suggestion(...)]` attributes with a `style = "{short,verbose,hidden}"` parameter. It also adds a new style, `tool-only`, that corresponds to `tool_only_span_suggestion`/`tool_only_multipart_suggestion` and causes the suggestion to not be shown in human-readable output at all. Best reviewed commit-by-commit, there's a bit of noise in there. cc #100717 `@compiler-errors` r? `@davidtwco`
This commit is contained in:
commit
69e705564d
15 changed files with 405 additions and 135 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