]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_span/src/analyze_source_file.rs
Auto merge of #105085 - oli-obk:stop_promoting_all_the_things, r=RalfJung
[rust.git] / compiler / rustc_span / src / analyze_source_file.rs
index d3c2c5113bcdec663f1b00fb9d873d316d7bccae..26cd54210d0bbb9c33134c7876269f4f7a336006 100644 (file)
@@ -175,7 +175,7 @@ unsafe fn analyze_source_file_sse2(src: &str,
             // There might still be a tail left to analyze
             let tail_start = chunk_count * CHUNK_SIZE + intra_chunk_offset;
             if tail_start < src.len() {
-                analyze_source_file_generic(&src[tail_start as usize ..],
+                analyze_source_file_generic(&src[tail_start ..],
                                         src.len() - tail_start,
                                         output_offset + BytePos::from_usize(tail_start),
                                         lines,
@@ -219,7 +219,7 @@ fn analyze_source_file_generic(
     while i < scan_len {
         let byte = unsafe {
             // We verified that i < scan_len <= src.len()
-            *src_bytes.get_unchecked(i as usize)
+            *src_bytes.get_unchecked(i)
         };
 
         // How much to advance in order to get to the next UTF-8 char in the