Skip to content

Commit

Permalink
Merge #5090
Browse files Browse the repository at this point in the history
5090: Bump deps r=matklad a=lnicola



Co-authored-by: Laurențiu Nicola <[email protected]>
  • Loading branch information
bors[bot] and lnicola authored Jun 27, 2020
2 parents 67b1dfb + 52a4889 commit 6a067ce
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 54 deletions.
88 changes: 48 additions & 40 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/ra_syntax/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ doctest = false
[dependencies]
itertools = "0.9.0"
rowan = "0.10.0"
rustc_lexer = { version = "661.0.0", package = "rustc-ap-rustc_lexer" }
rustc_lexer = { version = "666.0.0", package = "rustc-ap-rustc_lexer" }
rustc-hash = "1.1.0"
arrayvec = "0.5.1"
once_cell = "1.3.1"
Expand Down
24 changes: 12 additions & 12 deletions crates/ra_syntax/src/parsing/lexer.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
//! Lexer analyzes raw input string and produces lexemes (tokens).
//! It is just a bridge to `rustc_lexer`.
use rustc_lexer::{LiteralKind as LK, RawStrError};

use std::convert::TryInto;

use crate::{
Expand Down Expand Up @@ -180,8 +182,6 @@ 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::{LexRawStrError, LiteralKind as LK};

#[rustfmt::skip]
let syntax_kind = match *kind {
LK::Int { empty_int: false, .. } => INT_NUMBER,
Expand Down Expand Up @@ -215,27 +215,27 @@ fn rustc_token_kind_to_syntax_kind(
return (BYTE_STRING, Some("Missing trailing `\"` symbol to terminate the byte 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 {
LK::RawStr { err, .. } => match err {
None => RAW_STRING,
Some(RawStrError::InvalidStarter { .. }) => return (RAW_STRING, Some("Missing `\"` symbol after `#` symbols to begin the raw string literal")),
Some(RawStrError::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")),
Some(RawStrError::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 {
LK::RawByteStr { err, .. } => match err {
None => RAW_BYTE_STRING,
Some(RawStrError::InvalidStarter { .. }) => return (RAW_BYTE_STRING, Some("Missing `\"` symbol after `#` symbols to begin the raw byte string literal")),
Some(RawStrError::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"))

},
Err(LexRawStrError::TooManyDelimiters { .. }) => return (RAW_BYTE_STRING, Some("Too many `#` symbols: raw byte strings may be delimited by up to 65535 `#` symbols")),
Some(RawStrError::TooManyDelimiters { .. }) => return (RAW_BYTE_STRING, Some("Too many `#` symbols: raw byte strings may be delimited by up to 65535 `#` symbols")),
},
};

Expand Down
2 changes: 1 addition & 1 deletion crates/rust-analyzer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ itertools = "0.9.0"
jod-thread = "0.1.0"
log = "0.4.8"
lsp-types = { version = "0.74.0", features = ["proposed"] }
parking_lot = "0.10.0"
parking_lot = "0.11.0"
pico-args = "0.3.1"
rand = { version = "0.7.3", features = ["small_rng"] }
rustc-hash = "1.1.0"
Expand Down

0 comments on commit 6a067ce

Please sign in to comment.