aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/rust-analyzer/src/main_loop/handlers.rs9
-rw-r--r--crates/rust-analyzer/tests/heavy_tests/main.rs2
2 files changed, 9 insertions, 2 deletions
diff --git a/crates/rust-analyzer/src/main_loop/handlers.rs b/crates/rust-analyzer/src/main_loop/handlers.rs
index 1bb8e4473..c2a5bf4d6 100644
--- a/crates/rust-analyzer/src/main_loop/handlers.rs
+++ b/crates/rust-analyzer/src/main_loop/handlers.rs
@@ -730,8 +730,13 @@ pub fn handle_code_action(
730 for fix in fixes_from_diagnostics { 730 for fix in fixes_from_diagnostics {
731 let title = fix.label; 731 let title = fix.label;
732 let edit = to_proto::snippet_workspace_edit(&snap, fix.source_change)?; 732 let edit = to_proto::snippet_workspace_edit(&snap, fix.source_change)?;
733 let action = 733 let action = lsp_ext::CodeAction {
734 lsp_ext::CodeAction { title, group: None, kind: None, edit: Some(edit), command: None }; 734 title,
735 group: None,
736 kind: Some(lsp_types::code_action_kind::QUICKFIX.into()),
737 edit: Some(edit),
738 command: None,
739 };
735 res.push(action); 740 res.push(action);
736 } 741 }
737 742
diff --git a/crates/rust-analyzer/tests/heavy_tests/main.rs b/crates/rust-analyzer/tests/heavy_tests/main.rs
index c1805787a..ad3476310 100644
--- a/crates/rust-analyzer/tests/heavy_tests/main.rs
+++ b/crates/rust-analyzer/tests/heavy_tests/main.rs
@@ -298,6 +298,7 @@ fn main() {}
298 } 298 }
299 ] 299 ]
300 }, 300 },
301 "kind": "quickfix",
301 "title": "Create module" 302 "title": "Create module"
302 }]), 303 }]),
303 ); 304 );
@@ -368,6 +369,7 @@ fn main() {{}}
368 } 369 }
369 ] 370 ]
370 }, 371 },
372 "kind": "quickfix",
371 "title": "Create module" 373 "title": "Create module"
372 }]), 374 }]),
373 ); 375 );