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.
1 parent 2d9f0e2 commit a5b25a2Copy full SHA for a5b25a2
compiler/rustc_parse/src/lexer/mod.rs
@@ -153,14 +153,15 @@ impl<'a> StringReader<'a> {
153
match core::slice::memchr::memchr(0xE2, &bytes) {
154
Some(idx) => {
155
// bytes are valid UTF-8 -> E2 must be followed by two bytes
156
- match bytes[idx + 1] {
+ let ch = &bytes[idx..idx + 3];
157
+ match ch[1] {
158
0x80 => {
- if (0xAA..=0xAE).contains(&bytes[idx + 2]) {
159
+ if (0xAA..=0xAE).contains(&ch[2]) {
160
break true;
161
}
162
163
0x81 => {
- if (0xA6..=0xA9).contains(&bytes[idx + 2]) {
164
+ if (0xA6..=0xA9).contains(&ch[2]) {
165
166
167
0 commit comments