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
This commit is contained in:
bors 2023-02-08 11:01:32 +00:00
commit 885c1ad578
4 changed files with 9 additions and 4 deletions

4
Cargo.lock generated
View file

@ -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",
]

View file

@ -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

View file

@ -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
}
}
};

View file

@ -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"