simplify length count
This commit is contained in:
parent
d4c364347c
commit
e2dc3967fa
@ -485,7 +485,7 @@ fn check_invoked_macro_name_span(&mut self) {
|
||||
}) {
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user