File tree 4 files changed +3
-2
lines changed
4 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -3672,6 +3672,7 @@ name = "rustc_ast"
3672
3672
version = " 0.0.0"
3673
3673
dependencies = [
3674
3674
" bitflags" ,
3675
+ " memchr" ,
3675
3676
" rustc_data_structures" ,
3676
3677
" rustc_index" ,
3677
3678
" rustc_lexer" ,
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ edition = "2021"
7
7
8
8
[dependencies ]
9
9
bitflags = " 1.2.1"
10
+ memchr = " 2.5.0"
10
11
rustc_data_structures = { path = " ../rustc_data_structures" }
11
12
rustc_index = { path = " ../rustc_index" }
12
13
rustc_lexer = { path = " ../rustc_lexer" }
Original file line number Diff line number Diff line change 16
16
#![ feature( let_chains) ]
17
17
#![ feature( min_specialization) ]
18
18
#![ feature( negative_impls) ]
19
- #![ feature( slice_internals) ]
20
19
#![ feature( stmt_expr_attributes) ]
21
20
#![ recursion_limit = "256" ]
22
21
#![ deny( rustc:: untranslatable_diagnostic) ]
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ pub fn contains_text_flow_control_chars(s: &str) -> bool {
17
17
// U+2069 - E2 81 A9
18
18
let mut bytes = s. as_bytes ( ) ;
19
19
loop {
20
- match core :: slice :: memchr:: memchr ( 0xE2 , bytes) {
20
+ match memchr:: memchr ( 0xE2 , bytes) {
21
21
Some ( idx) => {
22
22
// bytes are valid UTF-8 -> E2 must be followed by two bytes
23
23
let ch = & bytes[ idx..idx + 3 ] ;
You can’t perform that action at this time.
0 commit comments