From 9f3adc540b51a4c2d0472d94033f6d9147b36f6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Mon, 21 Jul 2025 09:27:37 +0300 Subject: [PATCH] Bump rustc-literal-escaper --- Cargo.lock | 12 +++--------- Cargo.toml | 2 +- crates/syntax/src/ast/token_ext.rs | 4 ++-- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f3adc4006a..711d032246 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1505,7 +1505,7 @@ dependencies = [ "edition", "expect-test", "ra-ap-rustc_lexer", - "rustc-literal-escaper 0.0.4", + "rustc-literal-escaper", "stdx", "tracing", ] @@ -1814,7 +1814,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18d2c4b48fa26e031b1cca0c8ca7433770f5e35e33da56da8636dae2cd45d4e1" dependencies = [ "ra-ap-rustc_lexer", - "rustc-literal-escaper 0.0.5", + "rustc-literal-escaper", ] [[package]] @@ -1966,12 +1966,6 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" -[[package]] -name = "rustc-literal-escaper" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab03008eb631b703dd16978282ae36c73282e7922fe101a4bd072a40ecea7b8b" - [[package]] name = "rustc-literal-escaper" version = "0.0.5" @@ -2265,7 +2259,7 @@ dependencies = [ "rayon", "rowan", "rustc-hash 2.1.1", - "rustc-literal-escaper 0.0.4", + "rustc-literal-escaper", "rustc_apfloat", "smol_str", "stdx", diff --git a/Cargo.toml b/Cargo.toml index b21ac158d8..1ca258abf4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -149,7 +149,7 @@ serde = { version = "1.0.219" } serde_derive = { version = "1.0.219" } serde_json = "1.0.140" rustc-hash = "2.1.1" -rustc-literal-escaper = "0.0.4" +rustc-literal-escaper = "0.0.5" smallvec = { version = "1.15.1", features = [ "const_new", "union", diff --git a/crates/syntax/src/ast/token_ext.rs b/crates/syntax/src/ast/token_ext.rs index 4afdda78a0..742c452616 100644 --- a/crates/syntax/src/ast/token_ext.rs +++ b/crates/syntax/src/ast/token_ext.rs @@ -309,8 +309,8 @@ impl ast::CString { let mut prev_end = 0; let mut has_error = None; let extend_unit = |buf: &mut Vec, unit: MixedUnit| match unit { - MixedUnit::Char(c) => buf.extend(c.encode_utf8(&mut [0; 4]).as_bytes()), - MixedUnit::HighByte(b) => buf.push(b), + MixedUnit::Char(c) => buf.extend(c.get().encode_utf8(&mut [0; 4]).as_bytes()), + MixedUnit::HighByte(b) => buf.push(b.get()), }; unescape_c_str(text, |char_range, unescaped| match (unescaped, buf.capacity() == 0) { (Ok(u), false) => extend_unit(&mut buf, u),