]> git.lizzy.rs Git - rust.git/blobdiff - src/etc/unicode.py
rollup merge of #19727: lfairy/patch-1
[rust.git] / src / etc / unicode.py
index 257cd80258246ef536c1195f155ea2184eed3f6a..63f1b3dcd4414f2fd4ec946acb3d5ab3db7ccf26 100755 (executable)
@@ -289,7 +289,7 @@ def emit_bsearch_range_table(f):
     f.write("""
 fn bsearch_range_table(c: char, r: &'static [(char,char)]) -> bool {
     use core::cmp::Ordering::{Equal, Less, Greater};
-    use core::slice::SlicePrelude;
+    use core::slice::SliceExt;
     r.binary_search(|&(lo,hi)| {
         if lo <= c && c <= hi { Equal }
         else if hi < c { Less }
@@ -347,7 +347,7 @@ def emit_conversions_module(f, lowerupper, upperlower):
     f.write("pub mod conversions {")
     f.write("""
     use core::cmp::Ordering::{Equal, Less, Greater};
-    use core::slice::SlicePrelude;
+    use core::slice::SliceExt;
     use core::option::Option;
     use core::option::Option::{Some, None};
     use core::slice;
@@ -386,8 +386,8 @@ def emit_conversions_module(f, lowerupper, upperlower):
 
 def emit_grapheme_module(f, grapheme_table, grapheme_cats):
     f.write("""pub mod grapheme {
-    use core::slice::SlicePrelude;
     use core::kinds::Copy;
+    use core::slice::SliceExt;
     pub use self::GraphemeCat::*;
     use core::slice;
 
@@ -431,7 +431,7 @@ def emit_charwidth_module(f, width_table):
     f.write("pub mod charwidth {\n")
     f.write("    use core::option::Option;\n")
     f.write("    use core::option::Option::{Some, None};\n")
-    f.write("    use core::slice::SlicePrelude;\n")
+    f.write("    use core::slice::SliceExt;\n")
     f.write("    use core::slice;\n")
     f.write("""
     fn bsearch_range_value_table(c: char, is_cjk: bool, r: &'static [(char, char, u8, u8)]) -> u8 {
@@ -531,7 +531,7 @@ def emit_norm_module(f, canon, compat, combine, norm_props):
     f.write("""
     fn bsearch_range_value_table(c: char, r: &'static [(char, char, u8)]) -> u8 {
         use core::cmp::Ordering::{Equal, Less, Greater};
-        use core::slice::SlicePrelude;
+        use core::slice::SliceExt;
         use core::slice;
         match r.binary_search(|&(lo, hi, _)| {
             if lo <= c && c <= hi { Equal }