From 26ef7e39f4d7cf150ac855e88efd4fd121f7e578 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 15 Jan 2021 20:40:40 +0300 Subject: [PATCH] Make SyntaxPtr lookup logarithmic closes #3934 cc https://github.com/rust-analyzer/rowan/pull/81 --- Cargo.lock | 40 ++++++++++++++++++++++++++++++---------- crates/syntax/Cargo.toml | 2 +- 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0d23bcc9e7..f9f1c041eb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -323,7 +323,7 @@ dependencies = [ "const_fn", "crossbeam-utils 0.8.1", "lazy_static", - "memoffset", + "memoffset 0.6.1", "scopeguard", ] @@ -908,6 +908,15 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "memoffset" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" +dependencies = [ + "autocfg", +] + [[package]] name = "memoffset" version = "0.6.1" @@ -1316,14 +1325,14 @@ checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581" [[package]] name = "rowan" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e081ed6eacce09e243b619ab90f069c27b0cff8a6d0eb8ad2ec935b65853798" +checksum = "ca9516377b32367ade2fbe1846c75afa4827c8976f1c7d05d5473573d18a1a04" dependencies = [ "rustc-hash", "smol_str", "text-size", - "thin-dst", + "triomphe", ] [[package]] @@ -1568,6 +1577,12 @@ dependencies = [ "text_edit", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "stdx" version = "0.0.0" @@ -1654,12 +1669,6 @@ dependencies = [ "text-size", ] -[[package]] -name = "thin-dst" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c46be180f1af9673ebb27bc1235396f61ef6965b3fe0dbb2e624deb604f0e" - [[package]] name = "thread_local" version = "1.1.0" @@ -1801,6 +1810,17 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "triomphe" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e9d872053cf9e5a833d8c1dd772cdc38ab66a908129d6f73c049c986161d07c" +dependencies = [ + "memoffset 0.5.6", + "serde", + "stable_deref_trait", +] + [[package]] name = "tt" version = "0.0.0" diff --git a/crates/syntax/Cargo.toml b/crates/syntax/Cargo.toml index cfeaed9e67..ad8b797fec 100644 --- a/crates/syntax/Cargo.toml +++ b/crates/syntax/Cargo.toml @@ -12,7 +12,7 @@ doctest = false [dependencies] itertools = "0.10.0" -rowan = "0.10.0" +rowan = "0.10.1" rustc_lexer = { version = "697.0.0", package = "rustc-ap-rustc_lexer" } rustc-hash = "1.1.0" arrayvec = "0.5.1"