We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
CStrUnit::Char
1 parent 29c5158 commit a50efe2Copy full SHA for a50efe2
compiler/rustc_ast/src/util/literal.rs
@@ -161,7 +161,6 @@ impl LitKind {
161
error = Err(LitError::NulInCStr(span));
162
}
163
Ok(CStrUnit::Byte(b)) => buf.push(b),
164
- Ok(CStrUnit::Char(c)) if c.len_utf8() == 1 => buf.push(c as u8),
165
Ok(CStrUnit::Char(c)) => {
166
buf.extend_from_slice(c.encode_utf8(&mut [0; 4]).as_bytes())
167
0 commit comments