about summary refs log tree commit diff
path: root/compiler/rustc_ast/src
diff options
context:
space:
mode:
authorMarijn Schouten <mhkbst@gmail.com>2025-07-08 10:16:44 +0000
committerMarijn Schouten <mhkbst@gmail.com>2025-07-08 10:16:44 +0000
commitd44dcd451326d32516c22ee5f998304afaf19c4d (patch)
treeab8c0f69edd9fd114acc285a34a3a6a8af430e97 /compiler/rustc_ast/src
parent2783fc43fd13a669f314742890acd64200ad0bbf (diff)
downloadrust-d44dcd451326d32516c22ee5f998304afaf19c4d.tar.gz
rust-d44dcd451326d32516c22ee5f998304afaf19c4d.zip
update to literal-escaper-0.0.5
Diffstat (limited to 'compiler/rustc_ast/src')
-rw-r--r--compiler/rustc_ast/src/util/literal.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_ast/src/util/literal.rs b/compiler/rustc_ast/src/util/literal.rs
index fa7878873e5..2dfd695d880 100644
--- a/compiler/rustc_ast/src/util/literal.rs
+++ b/compiler/rustc_ast/src/util/literal.rs
@@ -126,11 +126,11 @@ impl LitKind {
             token::CStr => {
                 let s = symbol.as_str();
                 let mut buf = Vec::with_capacity(s.len());
-                unescape_c_str(s, |_span, c| match c {
+                unescape_c_str(s, |_span, res| match res {
                     Ok(MixedUnit::Char(c)) => {
-                        buf.extend_from_slice(c.encode_utf8(&mut [0; 4]).as_bytes())
+                        buf.extend_from_slice(c.get().encode_utf8(&mut [0; 4]).as_bytes())
                     }
-                    Ok(MixedUnit::HighByte(b)) => buf.push(b),
+                    Ok(MixedUnit::HighByte(b)) => buf.push(b.get()),
                     Err(err) => {
                         assert!(!err.is_fatal(), "failed to unescape C string literal")
                     }