File tree Expand file tree Collapse file tree 4 files changed +3
-2
lines changed Expand file tree Collapse file tree 4 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -3672,6 +3672,7 @@ name = "rustc_ast"
36723672version = " 0.0.0"
36733673dependencies = [
36743674 " bitflags" ,
3675+ " memchr" ,
36753676 " rustc_data_structures" ,
36763677 " rustc_index" ,
36773678 " rustc_lexer" ,
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ edition = "2021"
77
88[dependencies ]
99bitflags = " 1.2.1"
10+ memchr = " 2.5.0"
1011rustc_data_structures = { path = " ../rustc_data_structures" }
1112rustc_index = { path = " ../rustc_index" }
1213rustc_lexer = { path = " ../rustc_lexer" }
Original file line number Diff line number Diff line change 1616#![ feature( let_chains) ]
1717#![ feature( min_specialization) ]
1818#![ feature( negative_impls) ]
19- #![ feature( slice_internals) ]
2019#![ feature( stmt_expr_attributes) ]
2120#![ recursion_limit = "256" ]
2221#![ 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 {
1717 // U+2069 - E2 81 A9
1818 let mut bytes = s. as_bytes ( ) ;
1919 loop {
20- match core :: slice :: memchr:: memchr ( 0xE2 , bytes) {
20+ match memchr:: memchr ( 0xE2 , bytes) {
2121 Some ( idx) => {
2222 // bytes are valid UTF-8 -> E2 must be followed by two bytes
2323 let ch = & bytes[ idx..idx + 3 ] ;
You can’t perform that action at this time.
0 commit comments