mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Add missing code="" attributes to suggestion subdiagnostics
This commit is contained in:
parent
57679fb1c5
commit
ae56d2a118
@ -289,7 +289,7 @@ pub enum BadTypePlusSub {
|
||||
#[diag(parser::maybe_recover_from_bad_qpath_stage_2)]
|
||||
struct BadQPathStage2 {
|
||||
#[primary_span]
|
||||
#[suggestion(applicability = "maybe-incorrect")]
|
||||
#[suggestion(code = "", applicability = "maybe-incorrect")]
|
||||
span: Span,
|
||||
ty: String,
|
||||
}
|
||||
@ -298,7 +298,7 @@ struct BadQPathStage2 {
|
||||
#[diag(parser::incorrect_semicolon)]
|
||||
struct IncorrectSemicolon<'a> {
|
||||
#[primary_span]
|
||||
#[suggestion_short(applicability = "machine-applicable")]
|
||||
#[suggestion_short(code = "", applicability = "machine-applicable")]
|
||||
span: Span,
|
||||
#[help]
|
||||
opt_help: Option<()>,
|
||||
@ -309,7 +309,7 @@ struct IncorrectSemicolon<'a> {
|
||||
#[diag(parser::incorrect_use_of_await)]
|
||||
struct IncorrectUseOfAwait {
|
||||
#[primary_span]
|
||||
#[suggestion(parser::parentheses_suggestion, applicability = "machine-applicable")]
|
||||
#[suggestion(parser::parentheses_suggestion, code = "", applicability = "machine-applicable")]
|
||||
span: Span,
|
||||
}
|
||||
|
||||
@ -329,7 +329,7 @@ struct IncorrectAwait {
|
||||
struct InInTypo {
|
||||
#[primary_span]
|
||||
span: Span,
|
||||
#[suggestion(applicability = "machine-applicable")]
|
||||
#[suggestion(code = "", applicability = "machine-applicable")]
|
||||
sugg_span: Span,
|
||||
}
|
||||
|
||||
|
@ -462,7 +462,7 @@ pub struct LinkSection {
|
||||
pub struct NoMangleForeign {
|
||||
#[label]
|
||||
pub span: Span,
|
||||
#[suggestion(applicability = "machine-applicable")]
|
||||
#[suggestion(code = "", applicability = "machine-applicable")]
|
||||
pub attr_span: Span,
|
||||
pub foreign_item_kind: &'static str,
|
||||
}
|
||||
@ -596,7 +596,7 @@ pub enum UnusedNote {
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(passes::unused)]
|
||||
pub struct Unused {
|
||||
#[suggestion(applicability = "machine-applicable")]
|
||||
#[suggestion(code = "", applicability = "machine-applicable")]
|
||||
pub attr_span: Span,
|
||||
#[subdiagnostic]
|
||||
pub note: UnusedNote,
|
||||
|
@ -294,7 +294,7 @@ struct WrongKindOfAnnotation {
|
||||
struct OptionsInErrors {
|
||||
#[label(typeck::label)]
|
||||
label: Option<Span>,
|
||||
#[suggestion(typeck::suggestion)]
|
||||
#[suggestion(typeck::suggestion, code = "...")]
|
||||
opt_sugg: Option<(Span, Applicability)>,
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user