about summary refs log tree commit diff
path: root/compiler/rustc_parse_format
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-01-24 15:24:58 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2024-01-25 12:28:11 +1100
commit86f371ed59e4172c9891bc9b976362a73689fb12 (patch)
treee689c5fb9d01f1d32e28d06f4339e24973b034a7 /compiler/rustc_parse_format
parent5e5aa6d556c273141a37c8cb542a022e3e9fae67 (diff)
downloadrust-86f371ed59e4172c9891bc9b976362a73689fb12.tar.gz
rust-86f371ed59e4172c9891bc9b976362a73689fb12.zip
Rename the unescaping functions.
`unescape_literal` becomes `unescape_unicode`, and `unescape_c_string`
becomes `unescape_mixed`. Because rfc3349 will mean that C string
literals will no longer be the only mixed utf8 literals.
Diffstat (limited to 'compiler/rustc_parse_format')
-rw-r--r--compiler/rustc_parse_format/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse_format/src/lib.rs b/compiler/rustc_parse_format/src/lib.rs
index 625764876a6..d76ee161da6 100644
--- a/compiler/rustc_parse_format/src/lib.rs
+++ b/compiler/rustc_parse_format/src/lib.rs
@@ -1056,7 +1056,7 @@ fn find_width_map_from_snippet(
 fn unescape_string(string: &str) -> Option<string::String> {
     let mut buf = string::String::new();
     let mut ok = true;
-    unescape::unescape_literal(string, unescape::Mode::Str, &mut |_, unescaped_char| {
+    unescape::unescape_unicode(string, unescape::Mode::Str, &mut |_, unescaped_char| {
         match unescaped_char {
             Ok(c) => buf.push(c),
             Err(_) => ok = false,