Unnamed repository; edit this file 'description' to name the repository.
Auto merge of #14102 - Veykril:bump-lexer, r=Veykril
minor: Bump `rustc-ap-rustc_lexer` Closes https://github.com/rust-lang/rust-analyzer/issues/9554
bors 2023-02-08
parent 512a93a · parent 4788c7a · commit 885c1ad
-rw-r--r--Cargo.lock4
-rw-r--r--crates/parser/Cargo.toml2
-rw-r--r--crates/parser/src/lexed_str.rs5
-rw-r--r--crates/syntax/Cargo.toml2
4 files changed, 9 insertions, 4 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 9cc34a876d..ef0316f30f 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1494,9 +1494,9 @@ dependencies = [
[[package]]
name = "rustc-ap-rustc_lexer"
-version = "725.0.0"
+version = "727.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f950742ef8a203aa7661aad3ab880438ddeb7f95d4b837c30d65db1a2c5df68e"
+checksum = "8f40f26e7abdcd3b982f36c09a634cc6187988fbf6ec466c91f8d30a12ac0237"
dependencies = [
"unicode-xid",
]
diff --git a/crates/parser/Cargo.toml b/crates/parser/Cargo.toml
index ab48b1392a..08359133f1 100644
--- a/crates/parser/Cargo.toml
+++ b/crates/parser/Cargo.toml
@@ -13,7 +13,7 @@ doctest = false
[dependencies]
drop_bomb = "0.1.5"
-rustc_lexer = { version = "725.0.0", package = "rustc-ap-rustc_lexer" }
+rustc_lexer = { version = "727.0.0", package = "rustc-ap-rustc_lexer" }
limit.workspace = true
diff --git a/crates/parser/src/lexed_str.rs b/crates/parser/src/lexed_str.rs
index b48921f191..100deff462 100644
--- a/crates/parser/src/lexed_str.rs
+++ b/crates/parser/src/lexed_str.rs
@@ -82,6 +82,7 @@ impl<'a> LexedStr<'a> {
pub fn text(&self, i: usize) -> &str {
self.range_text(i..i + 1)
}
+
pub fn range_text(&self, r: ops::Range<usize>) -> &str {
assert!(r.start < r.end && r.end <= self.len());
let lo = self.start[r.start] as usize;
@@ -216,6 +217,10 @@ impl<'a> Converter<'a> {
rustc_lexer::TokenKind::Caret => T![^],
rustc_lexer::TokenKind::Percent => T![%],
rustc_lexer::TokenKind::Unknown => ERROR,
+ rustc_lexer::TokenKind::UnknownPrefix => {
+ err = "unknown literal prefix";
+ IDENT
+ }
}
};
diff --git a/crates/syntax/Cargo.toml b/crates/syntax/Cargo.toml
index 1a845a6ee7..8fc493a23f 100644
--- a/crates/syntax/Cargo.toml
+++ b/crates/syntax/Cargo.toml
@@ -16,7 +16,7 @@ doctest = false
cov-mark = "2.0.0-pre.1"
itertools = "0.10.5"
rowan = "0.15.10"
-rustc_lexer = { version = "725.0.0", package = "rustc-ap-rustc_lexer" }
+rustc_lexer = { version = "727.0.0", package = "rustc-ap-rustc_lexer" }
rustc-hash = "1.1.0"
once_cell = "1.17.0"
indexmap = "1.9.1"