File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -272,7 +272,7 @@ impl<'a> Translator<'a> {
272
272
) {
273
273
for child in children {
274
274
if let NodeOrToken :: Token ( token) = child {
275
- if token. kind ( ) == SyntaxKind :: COMMENT {
275
+ if token. kind ( ) == SyntaxKind :: COMMENT && self . source_kind == SourceKind :: Source {
276
276
let label = self . trap . emit ( generated:: Comment {
277
277
id : TrapId :: Star ,
278
278
parent : parent_label,
@@ -655,6 +655,9 @@ impl<'a> Translator<'a> {
655
655
pub ( crate ) fn should_be_excluded ( & self , item : & impl ast:: AstNode ) -> bool {
656
656
if self . source_kind == SourceKind :: Library {
657
657
let syntax = item. syntax ( ) ;
658
+ if syntax. kind ( ) == SyntaxKind :: TOKEN_TREE {
659
+ return true ;
660
+ }
658
661
if syntax
659
662
. parent ( )
660
663
. and_then ( Fn :: cast)
You can’t perform that action at this time.
0 commit comments