d7cd88b1a2
This allows us to run the auto fix command from vscode to automatically fix all diagnostics in the file. They are also distinguished in the UI.
75 lines
2.4 KiB
Plaintext
75 lines
2.4 KiB
Plaintext
[
|
|
MappedRustDiagnostic {
|
|
url: "file:///test/driver/subcommand/repl.rs",
|
|
diagnostic: Diagnostic {
|
|
range: Range {
|
|
start: Position {
|
|
line: 290,
|
|
character: 8,
|
|
},
|
|
end: Position {
|
|
line: 290,
|
|
character: 11,
|
|
},
|
|
},
|
|
severity: Some(
|
|
Warning,
|
|
),
|
|
code: Some(
|
|
String(
|
|
"unused_variables",
|
|
),
|
|
),
|
|
source: Some(
|
|
"rustc",
|
|
),
|
|
message: "unused variable: `foo`\n#[warn(unused_variables)] on by default",
|
|
related_information: None,
|
|
tags: Some(
|
|
[
|
|
Unnecessary,
|
|
],
|
|
),
|
|
},
|
|
fixes: [
|
|
CodeAction {
|
|
title: "consider prefixing with an underscore",
|
|
id: None,
|
|
group: None,
|
|
kind: Some(
|
|
CodeActionKind(
|
|
"quickfix",
|
|
),
|
|
),
|
|
edit: Some(
|
|
SnippetWorkspaceEdit {
|
|
changes: Some(
|
|
{
|
|
"file:///test/driver/subcommand/repl.rs": [
|
|
TextEdit {
|
|
range: Range {
|
|
start: Position {
|
|
line: 290,
|
|
character: 8,
|
|
},
|
|
end: Position {
|
|
line: 290,
|
|
character: 11,
|
|
},
|
|
},
|
|
new_text: "_foo",
|
|
},
|
|
],
|
|
},
|
|
),
|
|
document_changes: None,
|
|
},
|
|
),
|
|
is_preferred: Some(
|
|
true,
|
|
),
|
|
},
|
|
],
|
|
},
|
|
]
|