Update snapshot tests due to removed SuggestedFix

This commit is contained in:
Emil Lauridsen 2020-02-03 12:24:57 +01:00
parent cde20bf8f0
commit 9f70f443a3
7 changed files with 67 additions and 39 deletions

View file

@ -61,25 +61,39 @@ MappedRustDiagnostic {
),
tags: None,
},
suggested_fixes: [
SuggestedFix {
fixes: [
CodeAction {
title: "consider passing by value instead: \'self\'",
location: Location {
uri: "file:///test/compiler/mir/tagset.rs",
range: Range {
start: Position {
line: 41,
character: 23,
},
end: Position {
line: 41,
character: 28,
},
kind: Some(
"quickfix",
),
diagnostics: None,
edit: Some(
WorkspaceEdit {
changes: Some(
{
"file:///test/compiler/mir/tagset.rs": [
TextEdit {
range: Range {
start: Position {
line: 41,
character: 23,
},
end: Position {
line: 41,
character: 28,
},
},
new_text: "self",
},
],
},
),
document_changes: None,
},
},
replacement: "self",
applicability: Unspecified,
diagnostics: [],
),
command: None,
is_preferred: None,
},
],
}

View file

@ -42,5 +42,5 @@ MappedRustDiagnostic {
related_information: None,
tags: None,
},
suggested_fixes: [],
fixes: [],
}

View file

@ -57,5 +57,5 @@ MappedRustDiagnostic {
),
tags: None,
},
suggested_fixes: [],
fixes: [],
}

View file

@ -42,5 +42,5 @@ MappedRustDiagnostic {
related_information: None,
tags: None,
},
suggested_fixes: [],
fixes: [],
}

View file

@ -42,5 +42,5 @@ MappedRustDiagnostic {
related_information: None,
tags: None,
},
suggested_fixes: [],
fixes: [],
}

View file

@ -46,25 +46,39 @@ MappedRustDiagnostic {
],
),
},
suggested_fixes: [
SuggestedFix {
fixes: [
CodeAction {
title: "consider prefixing with an underscore: \'_foo\'",
location: Location {
uri: "file:///test/driver/subcommand/repl.rs",
range: Range {
start: Position {
line: 290,
character: 8,
},
end: Position {
line: 290,
character: 11,
},
kind: Some(
"quickfix",
),
diagnostics: None,
edit: Some(
WorkspaceEdit {
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,
},
},
replacement: "_foo",
applicability: MachineApplicable,
diagnostics: [],
),
command: None,
is_preferred: None,
},
],
}

View file

@ -61,5 +61,5 @@ MappedRustDiagnostic {
),
tags: None,
},
suggested_fixes: [],
fixes: [],
}