aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock68
-rw-r--r--crates/ra_hir_ty/Cargo.toml2
-rw-r--r--crates/ra_proc_macro_srv/Cargo.toml2
-rw-r--r--crates/ra_proc_macro_srv/src/tests/fixtures/test_serialize_proc_macro.txt7
-rw-r--r--crates/ra_proc_macro_srv/src/tests/mod.rs6
-rw-r--r--crates/ra_project_model/Cargo.toml2
-rw-r--r--crates/ra_syntax/Cargo.toml4
-rw-r--r--crates/ra_syntax/src/parsing/lexer.rs37
-rw-r--r--crates/rust-analyzer/Cargo.toml2
9 files changed, 81 insertions, 49 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 522ecf2ee..85ea4f178 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -58,9 +58,9 @@ dependencies = [
58 58
59[[package]] 59[[package]]
60name = "backtrace-sys" 60name = "backtrace-sys"
61version = "0.1.36" 61version = "0.1.37"
62source = "registry+https://github.com/rust-lang/crates.io-index" 62source = "registry+https://github.com/rust-lang/crates.io-index"
63checksum = "78848718ee1255a2485d1309ad9cdecfc2e7d0362dd11c6829364c6b35ae1bc7" 63checksum = "18fbebbe1c9d1f383a9cc7e8ccdb471b91c8d024ee9c2ca5b5346121fe8b4399"
64dependencies = [ 64dependencies = [
65 "cc", 65 "cc",
66 "libc", 66 "libc",
@@ -170,7 +170,7 @@ dependencies = [
170 "chalk-ir", 170 "chalk-ir",
171 "chalk-macros", 171 "chalk-macros",
172 "chalk-rust-ir", 172 "chalk-rust-ir",
173 "ena", 173 "ena 0.13.1",
174 "itertools", 174 "itertools",
175 "petgraph", 175 "petgraph",
176 "rustc-hash", 176 "rustc-hash",
@@ -199,14 +199,15 @@ dependencies = [
199 199
200[[package]] 200[[package]]
201name = "console" 201name = "console"
202version = "0.10.0" 202version = "0.10.3"
203source = "registry+https://github.com/rust-lang/crates.io-index" 203source = "registry+https://github.com/rust-lang/crates.io-index"
204checksum = "6728a28023f207181b193262711102bfbaf47cc9d13bc71d0736607ef8efe88c" 204checksum = "2586208b33573b7f76ccfbe5adb076394c88deaf81b84d7213969805b0a952a7"
205dependencies = [ 205dependencies = [
206 "clicolors-control", 206 "clicolors-control",
207 "encode_unicode", 207 "encode_unicode",
208 "lazy_static", 208 "lazy_static",
209 "libc", 209 "libc",
210 "terminal_size",
210 "termios", 211 "termios",
211 "winapi 0.3.8", 212 "winapi 0.3.8",
212] 213]
@@ -316,6 +317,15 @@ dependencies = [
316] 317]
317 318
318[[package]] 319[[package]]
320name = "ena"
321version = "0.14.0"
322source = "registry+https://github.com/rust-lang/crates.io-index"
323checksum = "d7402b94a93c24e742487327a7cd839dc9d36fec9de9fb25b09f2dae459f36c3"
324dependencies = [
325 "log",
326]
327
328[[package]]
319name = "encode_unicode" 329name = "encode_unicode"
320version = "0.3.6" 330version = "0.3.6"
321source = "registry+https://github.com/rust-lang/crates.io-index" 331source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -381,9 +391,9 @@ dependencies = [
381 391
382[[package]] 392[[package]]
383name = "fst" 393name = "fst"
384version = "0.4.1" 394version = "0.4.3"
385source = "registry+https://github.com/rust-lang/crates.io-index" 395source = "registry+https://github.com/rust-lang/crates.io-index"
386checksum = "4eaf9ea41cc964d742f7fc7861db75d2d6e83a3ce0d897d5c6f8b621f015ddc8" 396checksum = "81f9cac32c1741cdf6b66be7dcf0d9c7f25ccf12f8aa84c16cfa31f9f14513b3"
387 397
388[[package]] 398[[package]]
389name = "fuchsia-zircon" 399name = "fuchsia-zircon"
@@ -447,9 +457,9 @@ dependencies = [
447 457
448[[package]] 458[[package]]
449name = "hermit-abi" 459name = "hermit-abi"
450version = "0.1.11" 460version = "0.1.12"
451source = "registry+https://github.com/rust-lang/crates.io-index" 461source = "registry+https://github.com/rust-lang/crates.io-index"
452checksum = "8a0d737e0f947a1864e93d33fdef4af8445a00d1ed8dc0c8ddb73139ea6abf15" 462checksum = "61565ff7aaace3525556587bd2dc31d4a07071957be715e63ce7b1eccf51a8f4"
453dependencies = [ 463dependencies = [
454 "libc", 464 "libc",
455] 465]
@@ -814,9 +824,9 @@ dependencies = [
814 824
815[[package]] 825[[package]]
816name = "paste" 826name = "paste"
817version = "0.1.10" 827version = "0.1.11"
818source = "registry+https://github.com/rust-lang/crates.io-index" 828source = "registry+https://github.com/rust-lang/crates.io-index"
819checksum = "ab4fb1930692d1b6a9cfabdde3d06ea0a7d186518e2f4d67660d8970e2fa647a" 829checksum = "a3c897744f63f34f7ae3a024d9162bb5001f4ad661dd24bea0dc9f075d2de1c6"
820dependencies = [ 830dependencies = [
821 "paste-impl", 831 "paste-impl",
822 "proc-macro-hack", 832 "proc-macro-hack",
@@ -824,9 +834,9 @@ dependencies = [
824 834
825[[package]] 835[[package]]
826name = "paste-impl" 836name = "paste-impl"
827version = "0.1.10" 837version = "0.1.11"
828source = "registry+https://github.com/rust-lang/crates.io-index" 838source = "registry+https://github.com/rust-lang/crates.io-index"
829checksum = "a62486e111e571b1e93b710b61e8f493c0013be39629b714cb166bdb06aa5a8a" 839checksum = "66fd6f92e3594f2dd7b3fc23e42d82e292f7bcda6d8e5dcd167072327234ab89"
830dependencies = [ 840dependencies = [
831 "proc-macro-hack", 841 "proc-macro-hack",
832 "proc-macro2", 842 "proc-macro2",
@@ -885,9 +895,9 @@ dependencies = [
885 895
886[[package]] 896[[package]]
887name = "quote" 897name = "quote"
888version = "1.0.3" 898version = "1.0.4"
889source = "registry+https://github.com/rust-lang/crates.io-index" 899source = "registry+https://github.com/rust-lang/crates.io-index"
890checksum = "2bdc6c187c65bca4260c9011c9e3132efe4909da44726bad24cf7572ae338d7f" 900checksum = "4c1f4b0efa5fc5e8ceb705136bfee52cfdb6a4e3509f770b478cd6ed434232a7"
891dependencies = [ 901dependencies = [
892 "proc-macro2", 902 "proc-macro2",
893] 903]
@@ -1023,7 +1033,7 @@ dependencies = [
1023 "chalk-ir", 1033 "chalk-ir",
1024 "chalk-rust-ir", 1034 "chalk-rust-ir",
1025 "chalk-solve", 1035 "chalk-solve",
1026 "ena", 1036 "ena 0.14.0",
1027 "insta", 1037 "insta",
1028 "itertools", 1038 "itertools",
1029 "log", 1039 "log",
@@ -1374,9 +1384,9 @@ dependencies = [
1374 1384
1375[[package]] 1385[[package]]
1376name = "rustc-ap-rustc_lexer" 1386name = "rustc-ap-rustc_lexer"
1377version = "652.0.0" 1387version = "656.0.0"
1378source = "registry+https://github.com/rust-lang/crates.io-index" 1388source = "registry+https://github.com/rust-lang/crates.io-index"
1379checksum = "3a6a43c4d0889218c5e2ae68ffea239f303fc05ab1078c73f74e63feb87f7889" 1389checksum = "9cbba98ec46e96a4663197dfa8c0378752de2006e314e5400c0ca74929d6692f"
1380dependencies = [ 1390dependencies = [
1381 "unicode-xid", 1391 "unicode-xid",
1382] 1392]
@@ -1486,18 +1496,18 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
1486 1496
1487[[package]] 1497[[package]]
1488name = "serde" 1498name = "serde"
1489version = "1.0.104" 1499version = "1.0.106"
1490source = "registry+https://github.com/rust-lang/crates.io-index" 1500source = "registry+https://github.com/rust-lang/crates.io-index"
1491checksum = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449" 1501checksum = "36df6ac6412072f67cf767ebbde4133a5b2e88e76dc6187fa7104cd16f783399"
1492dependencies = [ 1502dependencies = [
1493 "serde_derive", 1503 "serde_derive",
1494] 1504]
1495 1505
1496[[package]] 1506[[package]]
1497name = "serde_derive" 1507name = "serde_derive"
1498version = "1.0.104" 1508version = "1.0.106"
1499source = "registry+https://github.com/rust-lang/crates.io-index" 1509source = "registry+https://github.com/rust-lang/crates.io-index"
1500checksum = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64" 1510checksum = "9e549e3abf4fb8621bd1609f11dfc9f5e50320802273b12f3811a67e6716ea6c"
1501dependencies = [ 1511dependencies = [
1502 "proc-macro2", 1512 "proc-macro2",
1503 "quote", 1513 "quote",
@@ -1506,9 +1516,9 @@ dependencies = [
1506 1516
1507[[package]] 1517[[package]]
1508name = "serde_json" 1518name = "serde_json"
1509version = "1.0.51" 1519version = "1.0.52"
1510source = "registry+https://github.com/rust-lang/crates.io-index" 1520source = "registry+https://github.com/rust-lang/crates.io-index"
1511checksum = "da07b57ee2623368351e9a0488bb0b261322a15a6e0ae53e243cbdc0f4208da9" 1521checksum = "a7894c8ed05b7a3a279aeb79025fdec1d3158080b75b98a08faf2806bb799edd"
1512dependencies = [ 1522dependencies = [
1513 "itoa", 1523 "itoa",
1514 "ryu", 1524 "ryu",
@@ -1607,6 +1617,16 @@ dependencies = [
1607] 1617]
1608 1618
1609[[package]] 1619[[package]]
1620name = "terminal_size"
1621version = "0.1.12"
1622source = "registry+https://github.com/rust-lang/crates.io-index"
1623checksum = "8038f95fc7a6f351163f4b964af631bd26c9e828f7db085f2a84aca56f70d13b"
1624dependencies = [
1625 "libc",
1626 "winapi 0.3.8",
1627]
1628
1629[[package]]
1610name = "termios" 1630name = "termios"
1611version = "0.3.2" 1631version = "0.3.2"
1612source = "registry+https://github.com/rust-lang/crates.io-index" 1632source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/crates/ra_hir_ty/Cargo.toml b/crates/ra_hir_ty/Cargo.toml
index 04d3cd6a2..65db6d1b0 100644
--- a/crates/ra_hir_ty/Cargo.toml
+++ b/crates/ra_hir_ty/Cargo.toml
@@ -11,7 +11,7 @@ doctest = false
11itertools = "0.9.0" 11itertools = "0.9.0"
12arrayvec = "0.5.1" 12arrayvec = "0.5.1"
13smallvec = "1.2.0" 13smallvec = "1.2.0"
14ena = "0.13.1" 14ena = "0.14.0"
15log = "0.4.8" 15log = "0.4.8"
16rustc-hash = "1.1.0" 16rustc-hash = "1.1.0"
17 17
diff --git a/crates/ra_proc_macro_srv/Cargo.toml b/crates/ra_proc_macro_srv/Cargo.toml
index ac2d156dc..886e14870 100644
--- a/crates/ra_proc_macro_srv/Cargo.toml
+++ b/crates/ra_proc_macro_srv/Cargo.toml
@@ -21,4 +21,4 @@ test_utils = { path = "../test_utils" }
21cargo_metadata = "0.9.1" 21cargo_metadata = "0.9.1"
22difference = "2.0.0" 22difference = "2.0.0"
23# used as proc macro test target 23# used as proc macro test target
24serde_derive = "=1.0.104" 24serde_derive = "=1.0.106"
diff --git a/crates/ra_proc_macro_srv/src/tests/fixtures/test_serialize_proc_macro.txt b/crates/ra_proc_macro_srv/src/tests/fixtures/test_serialize_proc_macro.txt
index 1f5d940fa..6776f5231 100644
--- a/crates/ra_proc_macro_srv/src/tests/fixtures/test_serialize_proc_macro.txt
+++ b/crates/ra_proc_macro_srv/src/tests/fixtures/test_serialize_proc_macro.txt
@@ -1,6 +1,11 @@
1SUBTREE $ 1SUBTREE $
2 PUNCH # [alone] 4294967295 2 PUNCH # [alone] 4294967295
3 SUBTREE [] 4294967295 3 SUBTREE [] 4294967295
4 IDENT doc 4294967295
5 SUBTREE () 4294967295
6 IDENT hidden 4294967295
7 PUNCH # [alone] 4294967295
8 SUBTREE [] 4294967295
4 IDENT allow 4294967295 9 IDENT allow 4294967295
5 SUBTREE () 4294967295 10 SUBTREE () 4294967295
6 IDENT non_upper_case_globals 4294967295 11 IDENT non_upper_case_globals 4294967295
@@ -184,4 +189,4 @@ SUBTREE $
184 IDENT end 4294967295 189 IDENT end 4294967295
185 SUBTREE () 4294967295 190 SUBTREE () 4294967295
186 IDENT __serde_state 4294967295 191 IDENT __serde_state 4294967295
187 PUNCH ; [alone] 4294967295 \ No newline at end of file 192 PUNCH ; [alone] 4294967295
diff --git a/crates/ra_proc_macro_srv/src/tests/mod.rs b/crates/ra_proc_macro_srv/src/tests/mod.rs
index 03f79bc5d..9cf58511c 100644
--- a/crates/ra_proc_macro_srv/src/tests/mod.rs
+++ b/crates/ra_proc_macro_srv/src/tests/mod.rs
@@ -10,7 +10,7 @@ fn test_derive_serialize_proc_macro() {
10 assert_expand( 10 assert_expand(
11 "serde_derive", 11 "serde_derive",
12 "Serialize", 12 "Serialize",
13 "1.0.104", 13 "1.0.106",
14 r##"struct Foo {}"##, 14 r##"struct Foo {}"##,
15 include_str!("fixtures/test_serialize_proc_macro.txt"), 15 include_str!("fixtures/test_serialize_proc_macro.txt"),
16 ); 16 );
@@ -21,7 +21,7 @@ fn test_derive_serialize_proc_macro_failed() {
21 assert_expand( 21 assert_expand(
22 "serde_derive", 22 "serde_derive",
23 "Serialize", 23 "Serialize",
24 "1.0.104", 24 "1.0.106",
25 r##" 25 r##"
26 struct {} 26 struct {}
27"##, 27"##,
@@ -37,7 +37,7 @@ SUBTREE $
37 37
38#[test] 38#[test]
39fn test_derive_proc_macro_list() { 39fn test_derive_proc_macro_list() {
40 let res = list("serde_derive", "1.0.104").join("\n"); 40 let res = list("serde_derive", "1.0.106").join("\n");
41 41
42 assert_eq_text!( 42 assert_eq_text!(
43 &res, 43 &res,
diff --git a/crates/ra_project_model/Cargo.toml b/crates/ra_project_model/Cargo.toml
index b10644b4b..5e651fe70 100644
--- a/crates/ra_project_model/Cargo.toml
+++ b/crates/ra_project_model/Cargo.toml
@@ -18,7 +18,7 @@ ra_db = { path = "../ra_db" }
18ra_cfg = { path = "../ra_cfg" } 18ra_cfg = { path = "../ra_cfg" }
19ra_proc_macro = { path = "../ra_proc_macro" } 19ra_proc_macro = { path = "../ra_proc_macro" }
20 20
21serde = { version = "1.0.104", features = ["derive"] } 21serde = { version = "1.0.106", features = ["derive"] }
22serde_json = "1.0.48" 22serde_json = "1.0.48"
23 23
24anyhow = "1.0.26" 24anyhow = "1.0.26"
diff --git a/crates/ra_syntax/Cargo.toml b/crates/ra_syntax/Cargo.toml
index 7ffe46c69..c07ff488e 100644
--- a/crates/ra_syntax/Cargo.toml
+++ b/crates/ra_syntax/Cargo.toml
@@ -13,7 +13,7 @@ doctest = false
13[dependencies] 13[dependencies]
14itertools = "0.9.0" 14itertools = "0.9.0"
15rowan = "0.10.0" 15rowan = "0.10.0"
16rustc_lexer = { version = "652.0.0", package = "rustc-ap-rustc_lexer" } 16rustc_lexer = { version = "656.0.0", package = "rustc-ap-rustc_lexer" }
17rustc-hash = "1.1.0" 17rustc-hash = "1.1.0"
18arrayvec = "0.5.1" 18arrayvec = "0.5.1"
19once_cell = "1.3.1" 19once_cell = "1.3.1"
@@ -27,7 +27,7 @@ ra_parser = { path = "../ra_parser" }
27# ideally, `serde` should be enabled by `rust-analyzer`, but we enable it here 27# ideally, `serde` should be enabled by `rust-analyzer`, but we enable it here
28# to reduce number of compilations 28# to reduce number of compilations
29smol_str = { version = "0.1.15", features = ["serde"] } 29smol_str = { version = "0.1.15", features = ["serde"] }
30serde = { version = "1.0.104", features = ["derive"] } 30serde = { version = "1.0.106", features = ["derive"] }
31 31
32[dev-dependencies] 32[dev-dependencies]
33test_utils = { path = "../test_utils" } 33test_utils = { path = "../test_utils" }
diff --git a/crates/ra_syntax/src/parsing/lexer.rs b/crates/ra_syntax/src/parsing/lexer.rs
index f450ef4a2..1a5a6dc06 100644
--- a/crates/ra_syntax/src/parsing/lexer.rs
+++ b/crates/ra_syntax/src/parsing/lexer.rs
@@ -180,7 +180,7 @@ fn rustc_token_kind_to_syntax_kind(
180 return (syntax_kind, None); 180 return (syntax_kind, None);
181 181
182 fn match_literal_kind(kind: &rustc_lexer::LiteralKind) -> (SyntaxKind, Option<&'static str>) { 182 fn match_literal_kind(kind: &rustc_lexer::LiteralKind) -> (SyntaxKind, Option<&'static str>) {
183 use rustc_lexer::LiteralKind as LK; 183 use rustc_lexer::{LexRawStrError, LiteralKind as LK};
184 184
185 #[rustfmt::skip] 185 #[rustfmt::skip]
186 let syntax_kind = match *kind { 186 let syntax_kind = match *kind {
@@ -215,21 +215,28 @@ fn rustc_token_kind_to_syntax_kind(
215 return (BYTE_STRING, Some("Missing trailing `\"` symbol to terminate the byte string literal")) 215 return (BYTE_STRING, Some("Missing trailing `\"` symbol to terminate the byte string literal"))
216 } 216 }
217 217
218 LK::RawStr { started: true, terminated: true, .. } => RAW_STRING, 218 LK::RawStr(str) => match str.validate() {
219 LK::RawStr { started: true, terminated: false, .. } => { 219 Ok(_) => RAW_STRING,
220 return (RAW_STRING, Some("Missing trailing `\"` with `#` symbols to terminate the raw string literal")) 220 Err(LexRawStrError::InvalidStarter) => return (RAW_STRING, Some("Missing `\"` symbol after `#` symbols to begin the raw string literal")),
221 } 221 Err(LexRawStrError::NoTerminator { expected, found, .. }) => if expected == found {
222 LK::RawStr { started: false, .. } => { 222 return (RAW_STRING, Some("Missing trailing `\"` to terminate the raw string literal"))
223 return (RAW_STRING, Some("Missing `\"` symbol after `#` symbols to begin the raw string literal")) 223 } else {
224 } 224 return (RAW_STRING, Some("Missing trailing `\"` with `#` symbols to terminate the raw string literal"))
225
226 },
227 Err(LexRawStrError::TooManyDelimiters { .. }) => return (RAW_STRING, Some("Too many `#` symbols: raw strings may be delimited by up to 65535 `#` symbols")),
228 },
229 LK::RawByteStr(str) => match str.validate() {
230 Ok(_) => RAW_BYTE_STRING,
231 Err(LexRawStrError::InvalidStarter) => return (RAW_BYTE_STRING, Some("Missing `\"` symbol after `#` symbols to begin the raw byte string literal")),
232 Err(LexRawStrError::NoTerminator { expected, found, .. }) => if expected == found {
233 return (RAW_BYTE_STRING, Some("Missing trailing `\"` to terminate the raw byte string literal"))
234 } else {
235 return (RAW_BYTE_STRING, Some("Missing trailing `\"` with `#` symbols to terminate the raw byte string literal"))
225 236
226 LK::RawByteStr { started: true, terminated: true, .. } => RAW_BYTE_STRING, 237 },
227 LK::RawByteStr { started: true, terminated: false, .. } => { 238 Err(LexRawStrError::TooManyDelimiters { .. }) => return (RAW_BYTE_STRING, Some("Too many `#` symbols: raw byte strings may be delimited by up to 65535 `#` symbols")),
228 return (RAW_BYTE_STRING, Some("Missing trailing `\"` with `#` symbols to terminate the raw byte string literal")) 239 },
229 }
230 LK::RawByteStr { started: false, .. } => {
231 return (RAW_BYTE_STRING, Some("Missing `\"` symbol after `#` symbols to begin the raw byte string literal"))
232 }
233 }; 240 };
234 241
235 (syntax_kind, None) 242 (syntax_kind, None)
diff --git a/crates/rust-analyzer/Cargo.toml b/crates/rust-analyzer/Cargo.toml
index 0459807fc..8c94f430a 100644
--- a/crates/rust-analyzer/Cargo.toml
+++ b/crates/rust-analyzer/Cargo.toml
@@ -26,7 +26,7 @@ pico-args = "0.3.1"
26rand = { version = "0.7.3", features = ["small_rng"] } 26rand = { version = "0.7.3", features = ["small_rng"] }
27relative-path = "1.0.0" 27relative-path = "1.0.0"
28rustc-hash = "1.1.0" 28rustc-hash = "1.1.0"
29serde = { version = "1.0.104", features = ["derive"] } 29serde = { version = "1.0.106", features = ["derive"] }
30serde_json = "1.0.48" 30serde_json = "1.0.48"
31threadpool = "1.7.1" 31threadpool = "1.7.1"
32 32