diff options
-rw-r--r-- | Cargo.lock | 34 | ||||
-rw-r--r-- | crates/assists/src/handlers/ignore_test.rs | 2 | ||||
-rw-r--r-- | crates/rust-analyzer/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/rust-analyzer/src/to_proto.rs | 21 |
4 files changed, 35 insertions, 24 deletions
diff --git a/Cargo.lock b/Cargo.lock index edadd1057..051d9e734 100644 --- a/Cargo.lock +++ b/Cargo.lock | |||
@@ -81,9 +81,9 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" | |||
81 | 81 | ||
82 | [[package]] | 82 | [[package]] |
83 | name = "backtrace" | 83 | name = "backtrace" |
84 | version = "0.3.54" | 84 | version = "0.3.55" |
85 | source = "registry+https://github.com/rust-lang/crates.io-index" | 85 | source = "registry+https://github.com/rust-lang/crates.io-index" |
86 | checksum = "2baad346b2d4e94a24347adeee9c7a93f412ee94b9cc26e5b59dea23848e9f28" | 86 | checksum = "ef5140344c85b01f9bbb4d4b7288a8aa4b3287ccef913a14bcc78a1063623598" |
87 | dependencies = [ | 87 | dependencies = [ |
88 | "addr2line", | 88 | "addr2line", |
89 | "cfg-if 1.0.0", | 89 | "cfg-if 1.0.0", |
@@ -139,9 +139,9 @@ dependencies = [ | |||
139 | 139 | ||
140 | [[package]] | 140 | [[package]] |
141 | name = "cc" | 141 | name = "cc" |
142 | version = "1.0.63" | 142 | version = "1.0.65" |
143 | source = "registry+https://github.com/rust-lang/crates.io-index" | 143 | source = "registry+https://github.com/rust-lang/crates.io-index" |
144 | checksum = "ad9c6140b5a2c7db40ea56eb1821245e5362b44385c05b76288b1a599934ac87" | 144 | checksum = "95752358c8f7552394baf48cd82695b345628ad3f170d607de3ca03b8dacca15" |
145 | 145 | ||
146 | [[package]] | 146 | [[package]] |
147 | name = "cfg" | 147 | name = "cfg" |
@@ -865,9 +865,9 @@ dependencies = [ | |||
865 | 865 | ||
866 | [[package]] | 866 | [[package]] |
867 | name = "lsp-types" | 867 | name = "lsp-types" |
868 | version = "0.83.1" | 868 | version = "0.84.0" |
869 | source = "registry+https://github.com/rust-lang/crates.io-index" | 869 | source = "registry+https://github.com/rust-lang/crates.io-index" |
870 | checksum = "c4e79f39834b97271f9f5ecec573e42c7d9c5bdbd2620b30a851054ece6aab6d" | 870 | checksum = "3b95be71fe205e44de754185bcf86447b65813ce1ceb298f8d3793ade5fff08d" |
871 | dependencies = [ | 871 | dependencies = [ |
872 | "base64", | 872 | "base64", |
873 | "bitflags", | 873 | "bitflags", |
@@ -1072,9 +1072,9 @@ checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" | |||
1072 | 1072 | ||
1073 | [[package]] | 1073 | [[package]] |
1074 | name = "oorandom" | 1074 | name = "oorandom" |
1075 | version = "11.1.2" | 1075 | version = "11.1.3" |
1076 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1076 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1077 | checksum = "a170cebd8021a008ea92e4db85a72f80b35df514ec664b296fdcbb654eac0b2c" | 1077 | checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" |
1078 | 1078 | ||
1079 | [[package]] | 1079 | [[package]] |
1080 | name = "parking_lot" | 1080 | name = "parking_lot" |
@@ -1165,9 +1165,9 @@ checksum = "28b9b4df73455c861d7cbf8be42f01d3b373ed7f02e378d55fa84eafc6f638b1" | |||
1165 | 1165 | ||
1166 | [[package]] | 1166 | [[package]] |
1167 | name = "pin-project-lite" | 1167 | name = "pin-project-lite" |
1168 | version = "0.1.11" | 1168 | version = "0.2.0" |
1169 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1169 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1170 | checksum = "c917123afa01924fc84bb20c4c03f004d9c38e5127e3c039bbf7f4b9c76a2f6b" | 1170 | checksum = "6b063f57ec186e6140e2b8b6921e5f1bd89c7356dda5b33acc5401203ca6131c" |
1171 | 1171 | ||
1172 | [[package]] | 1172 | [[package]] |
1173 | name = "plain" | 1173 | name = "plain" |
@@ -1627,9 +1627,9 @@ version = "0.0.0" | |||
1627 | 1627 | ||
1628 | [[package]] | 1628 | [[package]] |
1629 | name = "syn" | 1629 | name = "syn" |
1630 | version = "1.0.48" | 1630 | version = "1.0.51" |
1631 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1631 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1632 | checksum = "cc371affeffc477f42a221a1e4297aedcea33d47d19b61455588bd9d8f6b19ac" | 1632 | checksum = "3b4f34193997d92804d359ed09953e25d5138df6bcc055a71bf68ee89fdf9223" |
1633 | dependencies = [ | 1633 | dependencies = [ |
1634 | "proc-macro2", | 1634 | "proc-macro2", |
1635 | "quote", | 1635 | "quote", |
@@ -1740,9 +1740,9 @@ dependencies = [ | |||
1740 | 1740 | ||
1741 | [[package]] | 1741 | [[package]] |
1742 | name = "tinyvec" | 1742 | name = "tinyvec" |
1743 | version = "1.0.1" | 1743 | version = "1.1.0" |
1744 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1744 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1745 | checksum = "b78a366903f506d2ad52ca8dc552102ffdd3e937ba8a227f024dc1d1eae28575" | 1745 | checksum = "ccf8dbc19eb42fba10e8feaaec282fb50e2c14b2726d6301dbfeed0f73306a6f" |
1746 | dependencies = [ | 1746 | dependencies = [ |
1747 | "tinyvec_macros", | 1747 | "tinyvec_macros", |
1748 | ] | 1748 | ] |
@@ -1762,11 +1762,11 @@ dependencies = [ | |||
1762 | 1762 | ||
1763 | [[package]] | 1763 | [[package]] |
1764 | name = "tracing" | 1764 | name = "tracing" |
1765 | version = "0.1.21" | 1765 | version = "0.1.22" |
1766 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1766 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1767 | checksum = "b0987850db3733619253fe60e17cb59b82d37c7e6c0236bb81e4d6b87c879f27" | 1767 | checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" |
1768 | dependencies = [ | 1768 | dependencies = [ |
1769 | "cfg-if 0.1.10", | 1769 | "cfg-if 1.0.0", |
1770 | "pin-project-lite", | 1770 | "pin-project-lite", |
1771 | "tracing-attributes", | 1771 | "tracing-attributes", |
1772 | "tracing-core", | 1772 | "tracing-core", |
diff --git a/crates/assists/src/handlers/ignore_test.rs b/crates/assists/src/handlers/ignore_test.rs index 2b9dff081..5096a0005 100644 --- a/crates/assists/src/handlers/ignore_test.rs +++ b/crates/assists/src/handlers/ignore_test.rs | |||
@@ -56,7 +56,7 @@ pub(crate) fn ignore_test(acc: &mut Assists, ctx: &AssistContext) -> Option<()> | |||
56 | 56 | ||
57 | fn has_ignore_attribute(fn_def: &ast::Fn) -> Option<ast::Attr> { | 57 | fn has_ignore_attribute(fn_def: &ast::Fn) -> Option<ast::Attr> { |
58 | fn_def.attrs().find_map(|attr| { | 58 | fn_def.attrs().find_map(|attr| { |
59 | if attr.path()?.syntax().text().to_string() == "ignore" { | 59 | if attr.path()?.syntax().text() == "ignore" { |
60 | Some(attr) | 60 | Some(attr) |
61 | } else { | 61 | } else { |
62 | None | 62 | None |
diff --git a/crates/rust-analyzer/Cargo.toml b/crates/rust-analyzer/Cargo.toml index 56c51486f..436f5041b 100644 --- a/crates/rust-analyzer/Cargo.toml +++ b/crates/rust-analyzer/Cargo.toml | |||
@@ -21,7 +21,7 @@ env_logger = { version = "0.8.1", default-features = false } | |||
21 | itertools = "0.9.0" | 21 | itertools = "0.9.0" |
22 | jod-thread = "0.1.0" | 22 | jod-thread = "0.1.0" |
23 | log = "0.4.8" | 23 | log = "0.4.8" |
24 | lsp-types = { version = "0.83.1", features = ["proposed"] } | 24 | lsp-types = { version = "0.84.0", features = ["proposed"] } |
25 | parking_lot = "0.11.0" | 25 | parking_lot = "0.11.0" |
26 | pico-args = "0.3.1" | 26 | pico-args = "0.3.1" |
27 | oorandom = "11.1.2" | 27 | oorandom = "11.1.2" |
diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs index 2f35425bb..2052b800c 100644 --- a/crates/rust-analyzer/src/to_proto.rs +++ b/crates/rust-analyzer/src/to_proto.rs | |||
@@ -629,12 +629,21 @@ pub(crate) fn resource_op( | |||
629 | match file_system_edit { | 629 | match file_system_edit { |
630 | FileSystemEdit::CreateFile { anchor, dst } => { | 630 | FileSystemEdit::CreateFile { anchor, dst } => { |
631 | let uri = snap.anchored_path(anchor, &dst); | 631 | let uri = snap.anchored_path(anchor, &dst); |
632 | lsp_types::ResourceOp::Create(lsp_types::CreateFile { uri, options: None }) | 632 | lsp_types::ResourceOp::Create(lsp_types::CreateFile { |
633 | uri, | ||
634 | options: None, | ||
635 | annotation: None, | ||
636 | }) | ||
633 | } | 637 | } |
634 | FileSystemEdit::MoveFile { src, anchor, dst } => { | 638 | FileSystemEdit::MoveFile { src, anchor, dst } => { |
635 | let old_uri = snap.file_id_to_url(src); | 639 | let old_uri = snap.file_id_to_url(src); |
636 | let new_uri = snap.anchored_path(anchor, &dst); | 640 | let new_uri = snap.anchored_path(anchor, &dst); |
637 | lsp_types::ResourceOp::Rename(lsp_types::RenameFile { old_uri, new_uri, options: None }) | 641 | lsp_types::ResourceOp::Rename(lsp_types::RenameFile { |
642 | old_uri, | ||
643 | new_uri, | ||
644 | options: None, | ||
645 | annotation: None, | ||
646 | }) | ||
638 | } | 647 | } |
639 | } | 648 | } |
640 | } | 649 | } |
@@ -684,9 +693,11 @@ impl From<lsp_ext::SnippetWorkspaceEdit> for lsp_types::WorkspaceEdit { | |||
684 | edits: edit | 693 | edits: edit |
685 | .edits | 694 | .edits |
686 | .into_iter() | 695 | .into_iter() |
687 | .map(|edit| lsp_types::TextEdit { | 696 | .map(|edit| { |
688 | range: edit.range, | 697 | lsp_types::OneOf::Left(lsp_types::TextEdit { |
689 | new_text: edit.new_text, | 698 | range: edit.range, |
699 | new_text: edit.new_text, | ||
700 | }) | ||
690 | }) | 701 | }) |
691 | .collect(), | 702 | .collect(), |
692 | }, | 703 | }, |