]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_ast/src/util/unicode.rs
Auto merge of #105218 - matthiaskrgr:rollup-8d3k08n, r=matthiaskrgr
[rust.git] / compiler / rustc_ast / src / util / unicode.rs
index f009f7b300ce0d7d1cf107f5ee9a4aba89473e95..0eae791b25e1c66e8da0b93bdfefa0ce7c5585bb 100644 (file)
@@ -17,7 +17,7 @@ pub fn contains_text_flow_control_chars(s: &str) -> bool {
     // U+2069 - E2 81 A9
     let mut bytes = s.as_bytes();
     loop {
-        match core::slice::memchr::memchr(0xE2, &bytes) {
+        match core::slice::memchr::memchr(0xE2, bytes) {
             Some(idx) => {
                 // bytes are valid UTF-8 -> E2 must be followed by two bytes
                 let ch = &bytes[idx..idx + 3];