From 1e20467c3a62f0b8a65605938a2ddb7babcfd8bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Fri, 1 May 2020 15:29:03 +0300 Subject: Bump deps --- crates/ra_hir_ty/Cargo.toml | 2 +- crates/ra_proc_macro_srv/Cargo.toml | 2 +- .../tests/fixtures/test_serialize_proc_macro.txt | 7 +++- crates/ra_proc_macro_srv/src/tests/mod.rs | 6 ++-- crates/ra_project_model/Cargo.toml | 2 +- crates/ra_syntax/Cargo.toml | 4 +-- crates/ra_syntax/src/parsing/lexer.rs | 37 +++++++++++++--------- crates/rust-analyzer/Cargo.toml | 2 +- 8 files changed, 37 insertions(+), 25 deletions(-) (limited to 'crates') 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 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 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" } 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_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,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 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() { 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, 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" } 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 7ffe46c69..c07ff488e 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 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( 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 0459807fc..8c94f430a 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" -- cgit v1.2.3