Skip to content

Commit 88b2110

Browse files
committed
Rust: attach TypeAnchor comments to its containing PathSegment
1 parent b78057c commit 88b2110

File tree

1 file changed

+7
-0
lines changed
  • rust/extractor/src/translate

1 file changed

+7
-0
lines changed

rust/extractor/src/translate/base.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,13 @@ impl<'a> Translator<'a> {
689689
{
690690
generated::PathSegment::emit_trait_type_repr(label, t, &mut self.trap.writer)
691691
}
692+
// moreover as we're skipping emission of TypeAnchor, we need to attach its comments to
693+
// this path segment
694+
self.emit_tokens(
695+
&anchor,
696+
label.into(),
697+
anchor.syntax().children_with_tokens(),
698+
);
692699
}
693700
}
694701

0 commit comments

Comments
 (0)