Repository: rust-analyzer/rust-analyzer
Pull request #4240 (2020-05-01 12:29:58)

Bump deps


Patch:
diff --git a/Cargo.lock b/Cargo.lock
index 522ecf2ee8..85ea4f178f 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -58,9 +58,9 @@ dependencies = [
 
 [[package]]
 name = "backtrace-sys"
-version = "0.1.36"
+version = "0.1.37"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "78848718ee1255a2485d1309ad9cdecfc2e7d0362dd11c6829364c6b35ae1bc7"
+checksum = "18fbebbe1c9d1f383a9cc7e8ccdb471b91c8d024ee9c2ca5b5346121fe8b4399"
 dependencies = [
  "cc",
  "libc",
@@ -170,7 +170,7 @@ dependencies = [
  "chalk-ir",
  "chalk-macros",
  "chalk-rust-ir",
- "ena",
+ "ena 0.13.1",
  "itertools",
  "petgraph",
  "rustc-hash",
@@ -199,14 +199,15 @@ dependencies = [
 
 [[package]]
 name = "console"
-version = "0.10.0"
+version = "0.10.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6728a28023f207181b193262711102bfbaf47cc9d13bc71d0736607ef8efe88c"
+checksum = "2586208b33573b7f76ccfbe5adb076394c88deaf81b84d7213969805b0a952a7"
 dependencies = [
  "clicolors-control",
  "encode_unicode",
  "lazy_static",
  "libc",
+ "terminal_size",
  "termios",
  "winapi 0.3.8",
 ]
@@ -315,6 +316,15 @@ dependencies = [
  "log",
 ]
 
+[[package]]
+name = "ena"
+version = "0.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d7402b94a93c24e742487327a7cd839dc9d36fec9de9fb25b09f2dae459f36c3"
+dependencies = [
+ "log",
+]
+
 [[package]]
 name = "encode_unicode"
 version = "0.3.6"
@@ -381,9 +391,9 @@ dependencies = [
 
 [[package]]
 name = "fst"
-version = "0.4.1"
+version = "0.4.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4eaf9ea41cc964d742f7fc7861db75d2d6e83a3ce0d897d5c6f8b621f015ddc8"
+checksum = "81f9cac32c1741cdf6b66be7dcf0d9c7f25ccf12f8aa84c16cfa31f9f14513b3"
 
 [[package]]
 name = "fuchsia-zircon"
@@ -447,9 +457,9 @@ dependencies = [
 
 [[package]]
 name = "hermit-abi"
-version = "0.1.11"
+version = "0.1.12"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a0d737e0f947a1864e93d33fdef4af8445a00d1ed8dc0c8ddb73139ea6abf15"
+checksum = "61565ff7aaace3525556587bd2dc31d4a07071957be715e63ce7b1eccf51a8f4"
 dependencies = [
  "libc",
 ]
@@ -814,9 +824,9 @@ dependencies = [
 
 [[package]]
 name = "paste"
-version = "0.1.10"
+version = "0.1.11"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ab4fb1930692d1b6a9cfabdde3d06ea0a7d186518e2f4d67660d8970e2fa647a"
+checksum = "a3c897744f63f34f7ae3a024d9162bb5001f4ad661dd24bea0dc9f075d2de1c6"
 dependencies = [
  "paste-impl",
  "proc-macro-hack",
@@ -824,9 +834,9 @@ dependencies = [
 
 [[package]]
 name = "paste-impl"
-version = "0.1.10"
+version = "0.1.11"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a62486e111e571b1e93b710b61e8f493c0013be39629b714cb166bdb06aa5a8a"
+checksum = "66fd6f92e3594f2dd7b3fc23e42d82e292f7bcda6d8e5dcd167072327234ab89"
 dependencies = [
  "proc-macro-hack",
  "proc-macro2",
@@ -885,9 +895,9 @@ dependencies = [
 
 [[package]]
 name = "quote"
-version = "1.0.3"
+version = "1.0.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2bdc6c187c65bca4260c9011c9e3132efe4909da44726bad24cf7572ae338d7f"
+checksum = "4c1f4b0efa5fc5e8ceb705136bfee52cfdb6a4e3509f770b478cd6ed434232a7"
 dependencies = [
  "proc-macro2",
 ]
@@ -1023,7 +1033,7 @@ dependencies = [
  "chalk-ir",
  "chalk-rust-ir",
  "chalk-solve",
- "ena",
+ "ena 0.14.0",
  "insta",
  "itertools",
  "log",
@@ -1374,9 +1384,9 @@ dependencies = [
 
 [[package]]
 name = "rustc-ap-rustc_lexer"
-version = "652.0.0"
+version = "656.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3a6a43c4d0889218c5e2ae68ffea239f303fc05ab1078c73f74e63feb87f7889"
+checksum = "9cbba98ec46e96a4663197dfa8c0378752de2006e314e5400c0ca74929d6692f"
 dependencies = [
  "unicode-xid",
 ]
@@ -1486,18 +1496,18 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
 
 [[package]]
 name = "serde"
-version = "1.0.104"
+version = "1.0.106"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449"
+checksum = "36df6ac6412072f67cf767ebbde4133a5b2e88e76dc6187fa7104cd16f783399"
 dependencies = [
  "serde_derive",
 ]
 
 [[package]]
 name = "serde_derive"
-version = "1.0.104"
+version = "1.0.106"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64"
+checksum = "9e549e3abf4fb8621bd1609f11dfc9f5e50320802273b12f3811a67e6716ea6c"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -1506,9 +1516,9 @@ dependencies = [
 
 [[package]]
 name = "serde_json"
-version = "1.0.51"
+version = "1.0.52"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da07b57ee2623368351e9a0488bb0b261322a15a6e0ae53e243cbdc0f4208da9"
+checksum = "a7894c8ed05b7a3a279aeb79025fdec1d3158080b75b98a08faf2806bb799edd"
 dependencies = [
  "itoa",
  "ryu",
@@ -1606,6 +1616,16 @@ dependencies = [
  "winapi 0.3.8",
 ]
 
+[[package]]
+name = "terminal_size"
+version = "0.1.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8038f95fc7a6f351163f4b964af631bd26c9e828f7db085f2a84aca56f70d13b"
+dependencies = [
+ "libc",
+ "winapi 0.3.8",
+]
+
 [[package]]
 name = "termios"
 version = "0.3.2"
diff --git a/crates/ra_hir_ty/Cargo.toml b/crates/ra_hir_ty/Cargo.toml
index 04d3cd6a27..65db6d1b08 100644
--- a/crates/ra_hir_ty/Cargo.toml
+++ b/crates/ra_hir_ty/Cargo.toml
@@ -11,7 +11,7 @@ doctest = false
 itertools = "0.9.0"
 arrayvec = "0.5.1"
 smallvec = "1.2.0"
-ena = "0.13.1"
+ena = "0.14.0"
 log = "0.4.8"
 rustc-hash = "1.1.0"
 
diff --git a/crates/ra_proc_macro_srv/Cargo.toml b/crates/ra_proc_macro_srv/Cargo.toml
index ac2d156dc2..886e148703 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" }
 cargo_metadata = "0.9.1"
 difference = "2.0.0"
 # used as proc macro test target
-serde_derive = "=1.0.104"
+serde_derive = "=1.0.106"
diff --git a/crates/ra_project_model/Cargo.toml b/crates/ra_project_model/Cargo.toml
index b10644b4b0..5e651fe70d 100644
--- a/crates/ra_project_model/Cargo.toml
+++ b/crates/ra_project_model/Cargo.toml
@@ -18,7 +18,7 @@ ra_db = { path = "../ra_db" }
 ra_cfg = { path = "../ra_cfg" }
 ra_proc_macro =  { path = "../ra_proc_macro" }
 
-serde = { version = "1.0.104", features = ["derive"] }
+serde = { version = "1.0.106", features = ["derive"] }
 serde_json = "1.0.48"
 
 anyhow = "1.0.26"
diff --git a/crates/ra_syntax/Cargo.toml b/crates/ra_syntax/Cargo.toml
index 7ffe46c699..c07ff488e4 100644
--- a/crates/ra_syntax/Cargo.toml
+++ b/crates/ra_syntax/Cargo.toml
@@ -13,7 +13,7 @@ doctest = false
 [dependencies]
 itertools = "0.9.0"
 rowan = "0.10.0"
-rustc_lexer = { version = "652.0.0", package = "rustc-ap-rustc_lexer" }
+rustc_lexer = { version = "656.0.0", package = "rustc-ap-rustc_lexer" }
 rustc-hash = "1.1.0"
 arrayvec = "0.5.1"
 once_cell = "1.3.1"
@@ -27,7 +27,7 @@ ra_parser = { path = "../ra_parser" }
 # ideally, `serde` should be enabled by `rust-analyzer`, but we enable it here
 # to reduce number of compilations
 smol_str = { version = "0.1.15", features = ["serde"] }
-serde = { version = "1.0.104", features = ["derive"] }
+serde = { version = "1.0.106", features = ["derive"] }
 
 [dev-dependencies]
 test_utils = { path = "../test_utils" }
diff --git a/crates/ra_syntax/src/parsing/lexer.rs b/crates/ra_syntax/src/parsing/lexer.rs
index f450ef4a2c..1a5a6dc065 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(
     return (syntax_kind, None);
 
     fn match_literal_kind(kind: &rustc_lexer::LiteralKind) -> (SyntaxKind, Option<&'static str>) {
-        use rustc_lexer::LiteralKind as LK;
+        use rustc_lexer::{LexRawStrError, LiteralKind as LK};
 
         #[rustfmt::skip]
         let syntax_kind = match *kind {
@@ -215,21 +215,28 @@ fn rustc_token_kind_to_syntax_kind(
                 return (BYTE_STRING, Some("Missing trailing `\"` symbol to terminate the byte string literal"))
             }
 
-            LK::RawStr { started: true, terminated: true, .. } => RAW_STRING,
-            LK::RawStr { started: true, terminated: false, .. } => {
-                return (RAW_STRING, Some("Missing trailing `\"` with `#` symbols to terminate the raw string literal"))
-            }
-            LK::RawStr { started: false, .. } => {
-                return (RAW_STRING, Some("Missing `\"` symbol after `#` symbols to begin the raw string literal"))
-            }
+            LK::RawStr(str) => match str.validate() {
+                Ok(_) => RAW_STRING,
+                Err(LexRawStrError::InvalidStarter) => return (RAW_STRING, Some("Missing `\"` symbol after `#` symbols to begin the raw string literal")),
+                Err(LexRawStrError::NoTerminator { expected, found, .. }) => if expected == found {
+                    return (RAW_STRING, Some("Missing trailing `\"` to terminate the raw string literal"))
+                } else {
+                    return (RAW_STRING, Some("Missing trailing `\"` with `#` symbols to terminate the raw string literal"))
+
+                },
+                Err(LexRawStrError::TooManyDelimiters { .. }) => return (RAW_STRING, Some("Too many `#` symbols: raw strings may be delimited by up to 65535 `#` symbols")),
+            },
+            LK::RawByteStr(str) => match str.validate() {
+                Ok(_) => RAW_BYTE_STRING,
+                Err(LexRawStrError::InvalidStarter) => return (RAW_BYTE_STRING, Some("Missing `\"` symbol after `#` symbols to begin the raw byte string literal")),
+                Err(LexRawStrError::NoTerminator { expected, found, .. }) => if expected == found {
+                    return (RAW_BYTE_STRING, Some("Missing trailing `\"` to terminate the raw byte string literal"))
+                } else {
+                    return (RAW_BYTE_STRING, Some("Missing trailing `\"` with `#` symbols to terminate the raw byte string literal"))
 
-            LK::RawByteStr { started: true, terminated: true, .. } => RAW_BYTE_STRING,
-            LK::RawByteStr { started: true, terminated: false, .. } => {
-                return (RAW_BYTE_STRING, Some("Missing trailing `\"` with `#` symbols to terminate the raw byte string literal"))
-            }
-            LK::RawByteStr { started: false, .. } => {
-                return (RAW_BYTE_STRING, Some("Missing `\"` symbol after `#` symbols to begin the raw byte string literal"))
-            }
+                },
+                Err(LexRawStrError::TooManyDelimiters { .. }) => return (RAW_BYTE_STRING, Some("Too many `#` symbols: raw byte strings may be delimited by up to 65535 `#` symbols")),
+            },
         };
 
         (syntax_kind, None)
diff --git a/crates/rust-analyzer/Cargo.toml b/crates/rust-analyzer/Cargo.toml
index 0459807fc9..8c94f430a2 100644
--- a/crates/rust-analyzer/Cargo.toml
+++ b/crates/rust-analyzer/Cargo.toml
@@ -26,7 +26,7 @@ pico-args = "0.3.1"
 rand = { version = "0.7.3", features = ["small_rng"] }
 relative-path = "1.0.0"
 rustc-hash = "1.1.0"
-serde = { version = "1.0.104", features = ["derive"] }
+serde = { version = "1.0.106", features = ["derive"] }
 serde_json = "1.0.48"
 threadpool = "1.7.1"
 


Test patch:
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 1f5d940fa0..6776f52317 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,5 +1,10 @@
 SUBTREE $
   PUNCH   # [alone] 4294967295
+  SUBTREE [] 4294967295
+    IDENT   doc 4294967295
+    SUBTREE () 4294967295
+      IDENT   hidden 4294967295
+  PUNCH   # [alone] 4294967295
   SUBTREE [] 4294967295
     IDENT   allow 4294967295
     SUBTREE () 4294967295
@@ -184,4 +189,4 @@ SUBTREE $
         IDENT   end 4294967295
         SUBTREE () 4294967295
           IDENT   __serde_state 4294967295
-  PUNCH   ; [alone] 4294967295
\ No newline at end of file
+  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 03f79bc5d6..9cf58511ce 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() {
     assert_expand(
         "serde_derive",
         "Serialize",
-        "1.0.104",
+        "1.0.106",
         r##"struct Foo {}"##,
         include_str!("fixtures/test_serialize_proc_macro.txt"),
     );
@@ -21,7 +21,7 @@ fn test_derive_serialize_proc_macro_failed() {
     assert_expand(
         "serde_derive",
         "Serialize",
-        "1.0.104",
+        "1.0.106",
         r##"
     struct {}
 "##,
@@ -37,7 +37,7 @@ SUBTREE $
 
 #[test]
 fn test_derive_proc_macro_list() {
-    let res = list("serde_derive", "1.0.104").join("\n");
+    let res = list("serde_derive", "1.0.106").join("\n");
 
     assert_eq_text!(
         &res,