Skip to content

Commit 304c116

Browse files
authored
Rollup merge of rust-lang#96916 - matthiaskrgr:simpl_count, r=compiler-errors
simplify length count
2 parents 17a735b + e2dc396 commit 304c116

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_mir_transform/src/coverage

1 file changed

+1
-1
lines changed

compiler/rustc_mir_transform/src/coverage/spans.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ impl<'a, 'tcx> CoverageSpans<'a, 'tcx> {
485485
}) {
486486
let merged_prefix_len = self.curr_original_span.lo() - self.curr().span.lo();
487487
let after_macro_bang =
488-
merged_prefix_len + BytePos(visible_macro.as_str().bytes().count() as u32 + 1);
488+
merged_prefix_len + BytePos(visible_macro.as_str().len() as u32 + 1);
489489
let mut macro_name_cov = self.curr().clone();
490490
self.curr_mut().span =
491491
self.curr().span.with_lo(self.curr().span.lo() + after_macro_bang);

0 commit comments

Comments
 (0)