Skip to content

Commit 16302d3

Browse files
committed
Use get_bytepos_after_visibility()
1 parent 3973cdd commit 16302d3

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/items.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1788,13 +1788,7 @@ fn rewrite_fn_base(
17881788
}
17891789

17901790
// Skip `pub(crate)`.
1791-
let lo_after_visibility = match fn_sig.visibility {
1792-
ast::Visibility::Crate(s, CrateSugar::PubCrate) => {
1793-
context.codemap.span_after(mk_sp(s.hi(), span.hi()), ")")
1794-
}
1795-
ast::Visibility::Crate(s, CrateSugar::JustCrate) => s.hi(),
1796-
_ => span.lo(),
1797-
};
1791+
let lo_after_visibility = get_bytepos_after_visibility(context, &fn_sig.visibility, span, ")");
17981792
// A conservative estimation, to goal is to be over all parens in generics
17991793
let args_start = fn_sig
18001794
.generics

0 commit comments

Comments
 (0)