Skip to content

Commit b3b26f4

Browse files
committed
Track whether an assoc item is in a trait impl or an inherent impl
1 parent ad0b41c commit b3b26f4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/visitor.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,8 @@ impl<'b, 'a: 'b> FmtVisitor<'a> {
624624
// TODO(calebcartwright): Not sure the skip spans are correct
625625
let (ai, skip_span, assoc_ctxt) = match visitor_kind {
626626
AssocTraitItem(ai) => (*ai, ai.span(), visit::AssocCtxt::Trait),
627-
AssocImplItem(ai) => (*ai, ai.span, visit::AssocCtxt::Impl),
627+
// There is no difference between trait and inherent assoc item formatting
628+
AssocImplItem(ai) => (*ai, ai.span, visit::AssocCtxt::Impl { of_trait: false }),
628629
_ => unreachable!(),
629630
};
630631
skip_out_of_file_lines_range_visitor!(self, ai.span);

0 commit comments

Comments
 (0)