Skip to content

Commit 6a067ce

Browse files
bors[bot]lnicola
andauthored
Merge #5090
5090: Bump deps r=matklad a=lnicola Co-authored-by: Laurențiu Nicola <[email protected]>
2 parents 67b1dfb + 52a4889 commit 6a067ce

File tree

4 files changed

+62
-54
lines changed

4 files changed

+62
-54
lines changed

Cargo.lock

Lines changed: 48 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/ra_syntax/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ doctest = false
1313
[dependencies]
1414
itertools = "0.9.0"
1515
rowan = "0.10.0"
16-
rustc_lexer = { version = "661.0.0", package = "rustc-ap-rustc_lexer" }
16+
rustc_lexer = { version = "666.0.0", package = "rustc-ap-rustc_lexer" }
1717
rustc-hash = "1.1.0"
1818
arrayvec = "0.5.1"
1919
once_cell = "1.3.1"

crates/ra_syntax/src/parsing/lexer.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
//! Lexer analyzes raw input string and produces lexemes (tokens).
22
//! It is just a bridge to `rustc_lexer`.
33
4+
use rustc_lexer::{LiteralKind as LK, RawStrError};
5+
46
use std::convert::TryInto;
57

68
use crate::{
@@ -180,8 +182,6 @@ fn rustc_token_kind_to_syntax_kind(
180182
return (syntax_kind, None);
181183

182184
fn match_literal_kind(kind: &rustc_lexer::LiteralKind) -> (SyntaxKind, Option<&'static str>) {
183-
use rustc_lexer::{LexRawStrError, LiteralKind as LK};
184-
185185
#[rustfmt::skip]
186186
let syntax_kind = match *kind {
187187
LK::Int { empty_int: false, .. } => INT_NUMBER,
@@ -215,27 +215,27 @@ fn rustc_token_kind_to_syntax_kind(
215215
return (BYTE_STRING, Some("Missing trailing `\"` symbol to terminate the byte string literal"))
216216
}
217217

218-
LK::RawStr(str) => match str.validate() {
219-
Ok(_) => RAW_STRING,
220-
Err(LexRawStrError::InvalidStarter) => return (RAW_STRING, Some("Missing `\"` symbol after `#` symbols to begin the raw string literal")),
221-
Err(LexRawStrError::NoTerminator { expected, found, .. }) => if expected == found {
218+
LK::RawStr { err, .. } => match err {
219+
None => RAW_STRING,
220+
Some(RawStrError::InvalidStarter { .. }) => return (RAW_STRING, Some("Missing `\"` symbol after `#` symbols to begin the raw string literal")),
221+
Some(RawStrError::NoTerminator { expected, found, .. }) => if expected == found {
222222
return (RAW_STRING, Some("Missing trailing `\"` to terminate the raw string literal"))
223223
} else {
224224
return (RAW_STRING, Some("Missing trailing `\"` with `#` symbols to terminate the raw string literal"))
225225

226226
},
227-
Err(LexRawStrError::TooManyDelimiters { .. }) => return (RAW_STRING, Some("Too many `#` symbols: raw strings may be delimited by up to 65535 `#` symbols")),
227+
Some(RawStrError::TooManyDelimiters { .. }) => return (RAW_STRING, Some("Too many `#` symbols: raw strings may be delimited by up to 65535 `#` symbols")),
228228
},
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 {
229+
LK::RawByteStr { err, .. } => match err {
230+
None => RAW_BYTE_STRING,
231+
Some(RawStrError::InvalidStarter { .. }) => return (RAW_BYTE_STRING, Some("Missing `\"` symbol after `#` symbols to begin the raw byte string literal")),
232+
Some(RawStrError::NoTerminator { expected, found, .. }) => if expected == found {
233233
return (RAW_BYTE_STRING, Some("Missing trailing `\"` to terminate the raw byte string literal"))
234234
} else {
235235
return (RAW_BYTE_STRING, Some("Missing trailing `\"` with `#` symbols to terminate the raw byte string literal"))
236236

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

crates/rust-analyzer/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ itertools = "0.9.0"
2121
jod-thread = "0.1.0"
2222
log = "0.4.8"
2323
lsp-types = { version = "0.74.0", features = ["proposed"] }
24-
parking_lot = "0.10.0"
24+
parking_lot = "0.11.0"
2525
pico-args = "0.3.1"
2626
rand = { version = "0.7.3", features = ["small_rng"] }
2727
rustc-hash = "1.1.0"

0 commit comments

Comments
 (0)