Skip to content

Conversation

edwin0cheng
Copy link
Contributor

No description provided.

// Replace the whole node if it is root
// `replace_descendants` will not replace the parent node
// but `SyntaxNode::descendants include itself
if expanded == *child.syntax() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or should we fix replace_descendants instead ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I think this is a better fix

Copy link
Contributor

@matklad matklad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

// Replace the whole node if it is root
// `replace_descendants` will not replace the parent node
// but `SyntaxNode::descendants include itself
if expanded == *child.syntax() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I think this is a better fix

bors bot added a commit that referenced this pull request Nov 22, 2019
2347: More correct expand macro r=matklad a=edwin0cheng



Co-authored-by: Edwin Cheng <[email protected]>
@bors
Copy link
Contributor

bors bot commented Nov 22, 2019

Build succeeded

  • TypeScript
  • Rust

@bors bors bot merged commit a92ad59 into rust-lang:master Nov 22, 2019
@edwin0cheng edwin0cheng deleted the fix-expand-in-let-stmt branch November 22, 2019 14:07
github-actions bot pushed a commit that referenced this pull request Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants