aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock84
-rw-r--r--crates/ide/src/doc_links.rs6
-rw-r--r--crates/rust-analyzer/src/to_proto.rs2
3 files changed, 49 insertions, 43 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 2fca1f638..bc3709d55 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4,9 +4,9 @@ version = 3
4 4
5[[package]] 5[[package]]
6name = "addr2line" 6name = "addr2line"
7version = "0.14.1" 7version = "0.15.1"
8source = "registry+https://github.com/rust-lang/crates.io-index" 8source = "registry+https://github.com/rust-lang/crates.io-index"
9checksum = "a55f82cfe485775d02112886f4169bde0c5894d75e79ead7eafe7e40a25e45f7" 9checksum = "03345e98af8f3d786b6d9f656ccfa6ac316d954e92bc4841f0bba20789d5fb5a"
10dependencies = [ 10dependencies = [
11 "gimli", 11 "gimli",
12] 12]
@@ -72,16 +72,16 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
72 72
73[[package]] 73[[package]]
74name = "backtrace" 74name = "backtrace"
75version = "0.3.58" 75version = "0.3.59"
76source = "registry+https://github.com/rust-lang/crates.io-index" 76source = "registry+https://github.com/rust-lang/crates.io-index"
77checksum = "88fb5a785d6b44fd9d6700935608639af1b8356de1e55d5f7c2740f4faa15d82" 77checksum = "4717cfcbfaa661a0fd48f8453951837ae7e8f81e481fbb136e3202d72805a744"
78dependencies = [ 78dependencies = [
79 "addr2line", 79 "addr2line",
80 "cc", 80 "cc",
81 "cfg-if", 81 "cfg-if",
82 "libc", 82 "libc",
83 "miniz_oxide", 83 "miniz_oxide",
84 "object", 84 "object 0.24.0",
85 "rustc-demangle", 85 "rustc-demangle",
86] 86]
87 87
@@ -452,9 +452,9 @@ checksum = "e398fae362f4124bbe630d99519fb2d68a03e2e3a23b441028cdcdc4f4895687"
452 452
453[[package]] 453[[package]]
454name = "gimli" 454name = "gimli"
455version = "0.23.0" 455version = "0.24.0"
456source = "registry+https://github.com/rust-lang/crates.io-index" 456source = "registry+https://github.com/rust-lang/crates.io-index"
457checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce" 457checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189"
458 458
459[[package]] 459[[package]]
460name = "hashbrown" 460name = "hashbrown"
@@ -715,9 +715,9 @@ dependencies = [
715 715
716[[package]] 716[[package]]
717name = "inotify" 717name = "inotify"
718version = "0.9.2" 718version = "0.9.3"
719source = "registry+https://github.com/rust-lang/crates.io-index" 719source = "registry+https://github.com/rust-lang/crates.io-index"
720checksum = "d19f57db1baad9d09e43a3cd76dcf82ebdafd37d75c9498b87762dba77c93f15" 720checksum = "b031475cb1b103ee221afb806a23d35e0570bf7271d7588762ceba8127ed43b3"
721dependencies = [ 721dependencies = [
722 "bitflags", 722 "bitflags",
723 "inotify-sys", 723 "inotify-sys",
@@ -830,9 +830,9 @@ dependencies = [
830 830
831[[package]] 831[[package]]
832name = "lsp-types" 832name = "lsp-types"
833version = "0.89.0" 833version = "0.89.1"
834source = "registry+https://github.com/rust-lang/crates.io-index" 834source = "registry+https://github.com/rust-lang/crates.io-index"
835checksum = "07731ecd4ee0654728359a5b95e2a254c857876c04b85225496a35d60345daa7" 835checksum = "48b8a871b0a450bcec0e26d74a59583c8173cb9fb7d7f98889e18abb84838e0f"
836dependencies = [ 836dependencies = [
837 "bitflags", 837 "bitflags",
838 "serde", 838 "serde",
@@ -1000,6 +1000,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1000checksum = "a9a7ab5d64814df0fe4a4b5ead45ed6c5f181ee3ff04ba344313a6c80446c5d4" 1000checksum = "a9a7ab5d64814df0fe4a4b5ead45ed6c5f181ee3ff04ba344313a6c80446c5d4"
1001 1001
1002[[package]] 1002[[package]]
1003name = "object"
1004version = "0.24.0"
1005source = "registry+https://github.com/rust-lang/crates.io-index"
1006checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170"
1007
1008[[package]]
1003name = "once_cell" 1009name = "once_cell"
1004version = "1.7.2" 1010version = "1.7.2"
1005source = "registry+https://github.com/rust-lang/crates.io-index" 1011source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1124,9 +1130,9 @@ checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5"
1124 1130
1125[[package]] 1131[[package]]
1126name = "proc-macro2" 1132name = "proc-macro2"
1127version = "1.0.26" 1133version = "1.0.27"
1128source = "registry+https://github.com/rust-lang/crates.io-index" 1134source = "registry+https://github.com/rust-lang/crates.io-index"
1129checksum = "a152013215dca273577e18d2bf00fa862b89b24169fb78c4c95aeb07992c9cec" 1135checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038"
1130dependencies = [ 1136dependencies = [
1131 "unicode-xid", 1137 "unicode-xid",
1132] 1138]
@@ -1140,7 +1146,7 @@ dependencies = [
1140 "jod-thread", 1146 "jod-thread",
1141 "log", 1147 "log",
1142 "memmap2", 1148 "memmap2",
1143 "object", 1149 "object 0.23.0",
1144 "profile", 1150 "profile",
1145 "serde", 1151 "serde",
1146 "serde_json", 1152 "serde_json",
@@ -1157,7 +1163,7 @@ dependencies = [
1157 "libloading", 1163 "libloading",
1158 "mbe", 1164 "mbe",
1159 "memmap2", 1165 "memmap2",
1160 "object", 1166 "object 0.23.0",
1161 "proc_macro_api", 1167 "proc_macro_api",
1162 "proc_macro_test", 1168 "proc_macro_test",
1163 "serde_derive", 1169 "serde_derive",
@@ -1235,9 +1241,9 @@ dependencies = [
1235 1241
1236[[package]] 1242[[package]]
1237name = "rayon" 1243name = "rayon"
1238version = "1.5.0" 1244version = "1.5.1"
1239source = "registry+https://github.com/rust-lang/crates.io-index" 1245source = "registry+https://github.com/rust-lang/crates.io-index"
1240checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" 1246checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90"
1241dependencies = [ 1247dependencies = [
1242 "autocfg", 1248 "autocfg",
1243 "crossbeam-deque", 1249 "crossbeam-deque",
@@ -1247,9 +1253,9 @@ dependencies = [
1247 1253
1248[[package]] 1254[[package]]
1249name = "rayon-core" 1255name = "rayon-core"
1250version = "1.9.0" 1256version = "1.9.1"
1251source = "registry+https://github.com/rust-lang/crates.io-index" 1257source = "registry+https://github.com/rust-lang/crates.io-index"
1252checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" 1258checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e"
1253dependencies = [ 1259dependencies = [
1254 "crossbeam-channel", 1260 "crossbeam-channel",
1255 "crossbeam-deque", 1261 "crossbeam-deque",
@@ -1260,18 +1266,18 @@ dependencies = [
1260 1266
1261[[package]] 1267[[package]]
1262name = "redox_syscall" 1268name = "redox_syscall"
1263version = "0.2.7" 1269version = "0.2.8"
1264source = "registry+https://github.com/rust-lang/crates.io-index" 1270source = "registry+https://github.com/rust-lang/crates.io-index"
1265checksum = "85dd92e586f7355c633911e11f77f3d12f04b1b1bd76a198bd34ae3af8341ef2" 1271checksum = "742739e41cd49414de871ea5e549afb7e2a3ac77b589bcbebe8c82fab37147fc"
1266dependencies = [ 1272dependencies = [
1267 "bitflags", 1273 "bitflags",
1268] 1274]
1269 1275
1270[[package]] 1276[[package]]
1271name = "regex" 1277name = "regex"
1272version = "1.5.3" 1278version = "1.5.4"
1273source = "registry+https://github.com/rust-lang/crates.io-index" 1279source = "registry+https://github.com/rust-lang/crates.io-index"
1274checksum = "ce5f1ceb7f74abbce32601642fcf8e8508a8a8991e0621c7d750295b9095702b" 1280checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461"
1275dependencies = [ 1281dependencies = [
1276 "regex-syntax", 1282 "regex-syntax",
1277] 1283]
@@ -1368,9 +1374,9 @@ dependencies = [
1368 1374
1369[[package]] 1375[[package]]
1370name = "rustc-demangle" 1376name = "rustc-demangle"
1371version = "0.1.18" 1377version = "0.1.19"
1372source = "registry+https://github.com/rust-lang/crates.io-index" 1378source = "registry+https://github.com/rust-lang/crates.io-index"
1373checksum = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232" 1379checksum = "410f7acf3cb3a44527c5d9546bad4bf4e6c460915d5f9f2fc524498bfe8f70ce"
1374 1380
1375[[package]] 1381[[package]]
1376name = "rustc-hash" 1382name = "rustc-hash"
@@ -1455,18 +1461,18 @@ dependencies = [
1455 1461
1456[[package]] 1462[[package]]
1457name = "serde" 1463name = "serde"
1458version = "1.0.125" 1464version = "1.0.126"
1459source = "registry+https://github.com/rust-lang/crates.io-index" 1465source = "registry+https://github.com/rust-lang/crates.io-index"
1460checksum = "558dc50e1a5a5fa7112ca2ce4effcb321b0300c0d4ccf0776a9f60cd89031171" 1466checksum = "ec7505abeacaec74ae4778d9d9328fe5a5d04253220a85c4ee022239fc996d03"
1461dependencies = [ 1467dependencies = [
1462 "serde_derive", 1468 "serde_derive",
1463] 1469]
1464 1470
1465[[package]] 1471[[package]]
1466name = "serde_derive" 1472name = "serde_derive"
1467version = "1.0.125" 1473version = "1.0.126"
1468source = "registry+https://github.com/rust-lang/crates.io-index" 1474source = "registry+https://github.com/rust-lang/crates.io-index"
1469checksum = "b093b7a2bb58203b5da3056c05b4ec1fed827dcfdb37347a8841695263b3d06d" 1475checksum = "963a7dbc9895aeac7ac90e74f34a5d5261828f79df35cbed41e10189d3804d43"
1470dependencies = [ 1476dependencies = [
1471 "proc-macro2", 1477 "proc-macro2",
1472 "quote", 1478 "quote",
@@ -1496,9 +1502,9 @@ dependencies = [
1496 1502
1497[[package]] 1503[[package]]
1498name = "serde_repr" 1504name = "serde_repr"
1499version = "0.1.6" 1505version = "0.1.7"
1500source = "registry+https://github.com/rust-lang/crates.io-index" 1506source = "registry+https://github.com/rust-lang/crates.io-index"
1501checksum = "2dc6b7951b17b051f3210b063f12cc17320e2fe30ae05b0fe2a3abb068551c76" 1507checksum = "98d0516900518c29efa217c298fa1f4e6c6ffc85ae29fd7f4ee48f176e1a9ed5"
1502dependencies = [ 1508dependencies = [
1503 "proc-macro2", 1509 "proc-macro2",
1504 "quote", 1510 "quote",
@@ -1548,9 +1554,9 @@ dependencies = [
1548 1554
1549[[package]] 1555[[package]]
1550name = "syn" 1556name = "syn"
1551version = "1.0.71" 1557version = "1.0.72"
1552source = "registry+https://github.com/rust-lang/crates.io-index" 1558source = "registry+https://github.com/rust-lang/crates.io-index"
1553checksum = "ad184cc9470f9117b2ac6817bfe297307418819ba40552f9b3846f05c33d5373" 1559checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82"
1554dependencies = [ 1560dependencies = [
1555 "proc-macro2", 1561 "proc-macro2",
1556 "quote", 1562 "quote",
@@ -1848,9 +1854,9 @@ checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
1848 1854
1849[[package]] 1855[[package]]
1850name = "url" 1856name = "url"
1851version = "2.2.1" 1857version = "2.2.2"
1852source = "registry+https://github.com/rust-lang/crates.io-index" 1858source = "registry+https://github.com/rust-lang/crates.io-index"
1853checksum = "9ccd964113622c8e9322cfac19eb1004a07e636c545f325da085d5cdde6f1f8b" 1859checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c"
1854dependencies = [ 1860dependencies = [
1855 "form_urlencoded", 1861 "form_urlencoded",
1856 "idna", 1862 "idna",
@@ -1957,18 +1963,18 @@ dependencies = [
1957 1963
1958[[package]] 1964[[package]]
1959name = "xshell" 1965name = "xshell"
1960version = "0.1.10" 1966version = "0.1.13"
1961source = "registry+https://github.com/rust-lang/crates.io-index" 1967source = "registry+https://github.com/rust-lang/crates.io-index"
1962checksum = "aa25217c682f9f991d7889238a99e65eb8431c266d36e0f4e850a73773415473" 1968checksum = "eb15bb1b41eb14efe628006294c294e10c366e03a0283b9c2063fc27d97934c6"
1963dependencies = [ 1969dependencies = [
1964 "xshell-macros", 1970 "xshell-macros",
1965] 1971]
1966 1972
1967[[package]] 1973[[package]]
1968name = "xshell-macros" 1974name = "xshell-macros"
1969version = "0.1.10" 1975version = "0.1.13"
1970source = "registry+https://github.com/rust-lang/crates.io-index" 1976source = "registry+https://github.com/rust-lang/crates.io-index"
1971checksum = "4404d53d2113af4fa31c58326eb7b37d6d7bf11ba87520787cddeaff45385c72" 1977checksum = "cf7ed94a2c75b9bcc57031229be2b57ee47ba71122f71aabef8610ec66a97e52"
1972 1978
1973[[package]] 1979[[package]]
1974name = "xtask" 1980name = "xtask"
diff --git a/crates/ide/src/doc_links.rs b/crates/ide/src/doc_links.rs
index 320694a17..ec3828ab2 100644
--- a/crates/ide/src/doc_links.rs
+++ b/crates/ide/src/doc_links.rs
@@ -286,7 +286,7 @@ fn get_doc_link(db: &RootDatabase, definition: Definition) -> Option<String> {
286 .and_then( 286 .and_then(
287 |url| if let Some(fragment) = fragment { url.join(&fragment).ok() } else { Some(url) }, 287 |url| if let Some(fragment) = fragment { url.join(&fragment).ok() } else { Some(url) },
288 ) 288 )
289 .map(|url| url.into_string()) 289 .map(|url| url.into())
290} 290}
291 291
292fn rewrite_intra_doc_link( 292fn rewrite_intra_doc_link(
@@ -325,7 +325,7 @@ fn rewrite_intra_doc_link(
325 }; 325 };
326 } 326 }
327 327
328 Some((new_url.into_string(), strip_prefixes_suffixes(title).to_string())) 328 Some((new_url.into(), strip_prefixes_suffixes(title).to_string()))
329} 329}
330 330
331/// Try to resolve path to local documentation via path-based links (i.e. `../gateway/struct.Shard.html`). 331/// Try to resolve path to local documentation via path-based links (i.e. `../gateway/struct.Shard.html`).
@@ -345,7 +345,7 @@ fn rewrite_url_link(db: &RootDatabase, def: ModuleDef, target: &str) -> Option<S
345 get_symbol_filename(db, &def).as_deref().map(|f| url.join(f).ok()).flatten() 345 get_symbol_filename(db, &def).as_deref().map(|f| url.join(f).ok()).flatten()
346 }) 346 })
347 .and_then(|url| url.join(target).ok()) 347 .and_then(|url| url.join(target).ok())
348 .map(|url| url.into_string()) 348 .map(|url| url.into())
349} 349}
350 350
351/// Rewrites a markdown document, applying 'callback' to each link. 351/// Rewrites a markdown document, applying 'callback' to each link.
diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs
index 0a3a56773..410384ae5 100644
--- a/crates/rust-analyzer/src/to_proto.rs
+++ b/crates/rust-analyzer/src/to_proto.rs
@@ -604,7 +604,7 @@ pub(crate) fn url_from_abs_path(path: &Path) -> lsp_types::Url {
604 // Note: lowercasing the `path` itself doesn't help, the `Url::parse` 604 // Note: lowercasing the `path` itself doesn't help, the `Url::parse`
605 // machinery *also* canonicalizes the drive letter. So, just massage the 605 // machinery *also* canonicalizes the drive letter. So, just massage the
606 // string in place. 606 // string in place.
607 let mut url = url.into_string(); 607 let mut url: String = url.into();
608 url[driver_letter_range].make_ascii_lowercase(); 608 url[driver_letter_range].make_ascii_lowercase();
609 lsp_types::Url::parse(&url).unwrap() 609 lsp_types::Url::parse(&url).unwrap()
610} 610}