Skip to content

Commit 9f70f44

Browse files
committed
Update snapshot tests due to removed SuggestedFix
1 parent cde20bf commit 9f70f44

7 files changed

+67
-39
lines changed

crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_clippy_pass_by_ref.snap

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -61,25 +61,39 @@ MappedRustDiagnostic {
6161
),
6262
tags: None,
6363
},
64-
suggested_fixes: [
65-
SuggestedFix {
64+
fixes: [
65+
CodeAction {
6666
title: "consider passing by value instead: \'self\'",
67-
location: Location {
68-
uri: "file:///test/compiler/mir/tagset.rs",
69-
range: Range {
70-
start: Position {
71-
line: 41,
72-
character: 23,
73-
},
74-
end: Position {
75-
line: 41,
76-
character: 28,
77-
},
67+
kind: Some(
68+
"quickfix",
69+
),
70+
diagnostics: None,
71+
edit: Some(
72+
WorkspaceEdit {
73+
changes: Some(
74+
{
75+
"file:///test/compiler/mir/tagset.rs": [
76+
TextEdit {
77+
range: Range {
78+
start: Position {
79+
line: 41,
80+
character: 23,
81+
},
82+
end: Position {
83+
line: 41,
84+
character: 28,
85+
},
86+
},
87+
new_text: "self",
88+
},
89+
],
90+
},
91+
),
92+
document_changes: None,
7893
},
79-
},
80-
replacement: "self",
81-
applicability: Unspecified,
82-
diagnostics: [],
94+
),
95+
command: None,
96+
is_preferred: None,
8397
},
8498
],
8599
}

crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_handles_macro_location.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ MappedRustDiagnostic {
4242
related_information: None,
4343
tags: None,
4444
},
45-
suggested_fixes: [],
45+
fixes: [],
4646
}

crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_macro_compiler_error.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ MappedRustDiagnostic {
5757
),
5858
tags: None,
5959
},
60-
suggested_fixes: [],
60+
fixes: [],
6161
}

crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_incompatible_type_for_trait.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ MappedRustDiagnostic {
4242
related_information: None,
4343
tags: None,
4444
},
45-
suggested_fixes: [],
45+
fixes: [],
4646
}

crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_mismatched_type.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ MappedRustDiagnostic {
4242
related_information: None,
4343
tags: None,
4444
},
45-
suggested_fixes: [],
45+
fixes: [],
4646
}

crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_unused_variable.snap

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -46,25 +46,39 @@ MappedRustDiagnostic {
4646
],
4747
),
4848
},
49-
suggested_fixes: [
50-
SuggestedFix {
49+
fixes: [
50+
CodeAction {
5151
title: "consider prefixing with an underscore: \'_foo\'",
52-
location: Location {
53-
uri: "file:///test/driver/subcommand/repl.rs",
54-
range: Range {
55-
start: Position {
56-
line: 290,
57-
character: 8,
58-
},
59-
end: Position {
60-
line: 290,
61-
character: 11,
62-
},
52+
kind: Some(
53+
"quickfix",
54+
),
55+
diagnostics: None,
56+
edit: Some(
57+
WorkspaceEdit {
58+
changes: Some(
59+
{
60+
"file:///test/driver/subcommand/repl.rs": [
61+
TextEdit {
62+
range: Range {
63+
start: Position {
64+
line: 290,
65+
character: 8,
66+
},
67+
end: Position {
68+
line: 290,
69+
character: 11,
70+
},
71+
},
72+
new_text: "_foo",
73+
},
74+
],
75+
},
76+
),
77+
document_changes: None,
6378
},
64-
},
65-
replacement: "_foo",
66-
applicability: MachineApplicable,
67-
diagnostics: [],
79+
),
80+
command: None,
81+
is_preferred: None,
6882
},
6983
],
7084
}

crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_wrong_number_of_parameters.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,5 @@ MappedRustDiagnostic {
6161
),
6262
tags: None,
6363
},
64-
suggested_fixes: [],
64+
fixes: [],
6565
}

0 commit comments

Comments
 (0)