Skip to content

Commit

Permalink
Rollup merge of #96916 - matthiaskrgr:simpl_count, r=compiler-errors
Browse files Browse the repository at this point in the history
simplify length count
  • Loading branch information
matthiaskrgr authored May 10, 2022
2 parents f80348b + e2dc396 commit af7424a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_mir_transform/src/coverage/spans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ impl<'a, 'tcx> CoverageSpans<'a, 'tcx> {
}) {
let merged_prefix_len = self.curr_original_span.lo() - self.curr().span.lo();
let after_macro_bang =
merged_prefix_len + BytePos(visible_macro.as_str().bytes().count() as u32 + 1);
merged_prefix_len + BytePos(visible_macro.as_str().len() as u32 + 1);
let mut macro_name_cov = self.curr().clone();
self.curr_mut().span =
self.curr().span.with_lo(self.curr().span.lo() + after_macro_bang);
Expand Down

0 comments on commit af7424a

Please sign in to comment.