Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/rust-analyzer/src/diagnostics/test_data/snap_multi_line_fix.txt')
-rw-r--r--crates/rust-analyzer/src/diagnostics/test_data/snap_multi_line_fix.txt142
1 files changed, 83 insertions, 59 deletions
diff --git a/crates/rust-analyzer/src/diagnostics/test_data/snap_multi_line_fix.txt b/crates/rust-analyzer/src/diagnostics/test_data/snap_multi_line_fix.txt
index f77abde515..d7987f65ed 100644
--- a/crates/rust-analyzer/src/diagnostics/test_data/snap_multi_line_fix.txt
+++ b/crates/rust-analyzer/src/diagnostics/test_data/snap_multi_line_fix.txt
@@ -114,7 +114,7 @@
tags: None,
data: None,
},
- fixes: [],
+ fix: None,
},
MappedRustDiagnostic {
url: Url {
@@ -205,7 +205,7 @@
tags: None,
data: None,
},
- fixes: [],
+ fix: None,
},
MappedRustDiagnostic {
url: Url {
@@ -296,68 +296,92 @@
tags: None,
data: None,
},
- fixes: [
- CodeAction {
- title: "return the expression directly: `(0..10).collect()`",
- group: None,
- kind: Some(
- CodeActionKind(
- "quickfix",
+ fix: Some(
+ Fix {
+ ranges: [
+ Range {
+ start: Position {
+ line: 2,
+ character: 4,
+ },
+ end: Position {
+ line: 2,
+ character: 30,
+ },
+ },
+ Range {
+ start: Position {
+ line: 3,
+ character: 4,
+ },
+ end: Position {
+ line: 3,
+ character: 5,
+ },
+ },
+ ],
+ action: CodeAction {
+ title: "return the expression directly: `(0..10).collect()`",
+ group: None,
+ kind: Some(
+ CodeActionKind(
+ "quickfix",
+ ),
),
- ),
- edit: Some(
- SnippetWorkspaceEdit {
- changes: Some(
- {
- Url {
- scheme: "file",
- cannot_be_a_base: false,
- username: "",
- password: None,
- host: None,
- port: None,
- path: "/test/src/main.rs",
- query: None,
- fragment: None,
- }: [
- TextEdit {
- range: Range {
- start: Position {
- line: 2,
- character: 4,
- },
- end: Position {
- line: 2,
- character: 30,
+ edit: Some(
+ SnippetWorkspaceEdit {
+ changes: Some(
+ {
+ Url {
+ scheme: "file",
+ cannot_be_a_base: false,
+ username: "",
+ password: None,
+ host: None,
+ port: None,
+ path: "/test/src/main.rs",
+ query: None,
+ fragment: None,
+ }: [
+ TextEdit {
+ range: Range {
+ start: Position {
+ line: 2,
+ character: 4,
+ },
+ end: Position {
+ line: 2,
+ character: 30,
+ },
},
+ new_text: "",
},
- new_text: "",
- },
- TextEdit {
- range: Range {
- start: Position {
- line: 3,
- character: 4,
- },
- end: Position {
- line: 3,
- character: 5,
+ TextEdit {
+ range: Range {
+ start: Position {
+ line: 3,
+ character: 4,
+ },
+ end: Position {
+ line: 3,
+ character: 5,
+ },
},
+ new_text: "(0..10).collect()",
},
- new_text: "(0..10).collect()",
- },
- ],
- },
- ),
- document_changes: None,
- change_annotations: None,
- },
- ),
- is_preferred: Some(
- true,
- ),
- data: None,
+ ],
+ },
+ ),
+ document_changes: None,
+ change_annotations: None,
+ },
+ ),
+ is_preferred: Some(
+ true,
+ ),
+ data: None,
+ },
},
- ],
+ ),
},
]