You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I understand generated getters in ast classes take the first child that matches the required type. However since AsmExpr is now also an Item (and therefore a Stmt), this can lead to overlaps where the last element of ast::MacroStmts::statements() will be a duplicate of ast::MacroStmts::expr(). This can be reproduced by any use of asm!, for example this one coming from https://doc.rust-lang.org/reference/inline-assembly.html
When expanding macros, this will result in a MacroStmts instance that exhibits this duplication. I don't know if this could cause any issues elsewhere in the library.
Theoretically this problem could also appear in StmtList, which is
'{'
Attr*
statements:Stmt*
tail_expr:Expr?
'}'
but I think that can't happen in practice yet, as there's no other way to produce an AsmExpr (and therefore something that is both an Expr and a Stmt) than by asm! or similar inline assembly macros, so an AsmExpr won't show up as a tail_expr in any StmtList instance.