Skip to content

Commit 92c0379

Browse files
Merge #7285
7285: Don't duplicate rustc diagnostics fixes r=matklad a=jonas-schievink Should fix #6851 Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2 parents a8587f1 + 36500fe commit 92c0379

File tree

5 files changed

+32
-282
lines changed

5 files changed

+32
-282
lines changed

crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable.txt

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -66,52 +66,7 @@
6666
),
6767
data: None,
6868
},
69-
fixes: [
70-
CodeAction {
71-
title: "consider prefixing with an underscore",
72-
group: None,
73-
kind: Some(
74-
CodeActionKind(
75-
"quickfix",
76-
),
77-
),
78-
edit: Some(
79-
SnippetWorkspaceEdit {
80-
changes: Some(
81-
{
82-
Url {
83-
scheme: "file",
84-
host: None,
85-
port: None,
86-
path: "/test/driver/subcommand/repl.rs",
87-
query: None,
88-
fragment: None,
89-
}: [
90-
TextEdit {
91-
range: Range {
92-
start: Position {
93-
line: 290,
94-
character: 8,
95-
},
96-
end: Position {
97-
line: 290,
98-
character: 11,
99-
},
100-
},
101-
new_text: "_foo",
102-
},
103-
],
104-
},
105-
),
106-
document_changes: None,
107-
},
108-
),
109-
is_preferred: Some(
110-
true,
111-
),
112-
data: None,
113-
},
114-
],
69+
fixes: [],
11570
},
11671
MappedRustDiagnostic {
11772
url: Url {

crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable_as_hint.txt

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -66,52 +66,7 @@
6666
),
6767
data: None,
6868
},
69-
fixes: [
70-
CodeAction {
71-
title: "consider prefixing with an underscore",
72-
group: None,
73-
kind: Some(
74-
CodeActionKind(
75-
"quickfix",
76-
),
77-
),
78-
edit: Some(
79-
SnippetWorkspaceEdit {
80-
changes: Some(
81-
{
82-
Url {
83-
scheme: "file",
84-
host: None,
85-
port: None,
86-
path: "/test/driver/subcommand/repl.rs",
87-
query: None,
88-
fragment: None,
89-
}: [
90-
TextEdit {
91-
range: Range {
92-
start: Position {
93-
line: 290,
94-
character: 8,
95-
},
96-
end: Position {
97-
line: 290,
98-
character: 11,
99-
},
100-
},
101-
new_text: "_foo",
102-
},
103-
],
104-
},
105-
),
106-
document_changes: None,
107-
},
108-
),
109-
is_preferred: Some(
110-
true,
111-
),
112-
data: None,
113-
},
114-
],
69+
fixes: [],
11570
},
11671
MappedRustDiagnostic {
11772
url: Url {

crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable_as_info.txt

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -66,52 +66,7 @@
6666
),
6767
data: None,
6868
},
69-
fixes: [
70-
CodeAction {
71-
title: "consider prefixing with an underscore",
72-
group: None,
73-
kind: Some(
74-
CodeActionKind(
75-
"quickfix",
76-
),
77-
),
78-
edit: Some(
79-
SnippetWorkspaceEdit {
80-
changes: Some(
81-
{
82-
Url {
83-
scheme: "file",
84-
host: None,
85-
port: None,
86-
path: "/test/driver/subcommand/repl.rs",
87-
query: None,
88-
fragment: None,
89-
}: [
90-
TextEdit {
91-
range: Range {
92-
start: Position {
93-
line: 290,
94-
character: 8,
95-
},
96-
end: Position {
97-
line: 290,
98-
character: 11,
99-
},
100-
},
101-
new_text: "_foo",
102-
},
103-
],
104-
},
105-
),
106-
document_changes: None,
107-
},
108-
),
109-
is_preferred: Some(
110-
true,
111-
),
112-
data: None,
113-
},
114-
],
69+
fixes: [],
11570
},
11671
MappedRustDiagnostic {
11772
url: Url {

crates/rust-analyzer/src/diagnostics/test_data/snap_multi_line_fix.txt

Lines changed: 2 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -102,65 +102,7 @@
102102
tags: None,
103103
data: None,
104104
},
105-
fixes: [
106-
CodeAction {
107-
title: "return the expression directly",
108-
group: None,
109-
kind: Some(
110-
CodeActionKind(
111-
"quickfix",
112-
),
113-
),
114-
edit: Some(
115-
SnippetWorkspaceEdit {
116-
changes: Some(
117-
{
118-
Url {
119-
scheme: "file",
120-
host: None,
121-
port: None,
122-
path: "/test/src/main.rs",
123-
query: None,
124-
fragment: None,
125-
}: [
126-
TextEdit {
127-
range: Range {
128-
start: Position {
129-
line: 2,
130-
character: 4,
131-
},
132-
end: Position {
133-
line: 2,
134-
character: 30,
135-
},
136-
},
137-
new_text: "",
138-
},
139-
TextEdit {
140-
range: Range {
141-
start: Position {
142-
line: 3,
143-
character: 4,
144-
},
145-
end: Position {
146-
line: 3,
147-
character: 5,
148-
},
149-
},
150-
new_text: "(0..10).collect()",
151-
},
152-
],
153-
},
154-
),
155-
document_changes: None,
156-
},
157-
),
158-
is_preferred: Some(
159-
true,
160-
),
161-
data: None,
162-
},
163-
],
105+
fixes: [],
164106
},
165107
MappedRustDiagnostic {
166108
url: Url {
@@ -242,65 +184,7 @@
242184
tags: None,
243185
data: None,
244186
},
245-
fixes: [
246-
CodeAction {
247-
title: "return the expression directly",
248-
group: None,
249-
kind: Some(
250-
CodeActionKind(
251-
"quickfix",
252-
),
253-
),
254-
edit: Some(
255-
SnippetWorkspaceEdit {
256-
changes: Some(
257-
{
258-
Url {
259-
scheme: "file",
260-
host: None,
261-
port: None,
262-
path: "/test/src/main.rs",
263-
query: None,
264-
fragment: None,
265-
}: [
266-
TextEdit {
267-
range: Range {
268-
start: Position {
269-
line: 2,
270-
character: 4,
271-
},
272-
end: Position {
273-
line: 2,
274-
character: 30,
275-
},
276-
},
277-
new_text: "",
278-
},
279-
TextEdit {
280-
range: Range {
281-
start: Position {
282-
line: 3,
283-
character: 4,
284-
},
285-
end: Position {
286-
line: 3,
287-
character: 5,
288-
},
289-
},
290-
new_text: "(0..10).collect()",
291-
},
292-
],
293-
},
294-
),
295-
document_changes: None,
296-
},
297-
),
298-
is_preferred: Some(
299-
true,
300-
),
301-
data: None,
302-
},
303-
],
187+
fixes: [],
304188
},
305189
MappedRustDiagnostic {
306190
url: Url {

0 commit comments

Comments
 (0)