Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug of "fill match arm" action in tokio::main macro #18794

Merged

Conversation

1hakusai1
Copy link
Contributor

close #18027

スクリーンショット 2024-12-30 20 07 37
スクリーンショット 2024-12-30 20 07 44

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 30, 2024
Comment on lines -264 to +266
if let Some(it) = first_new_arm.and_then(|arm| arm.syntax().descendants().find_map(ast::WildcardPat::cast)) {
if let Some(it) = first_new_arm
.and_then(|arm| arm.syntax().descendants().find_map(ast::WildcardPat::cast))
{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This line was formatted automatically.

@Veykril Veykril enabled auto-merge December 30, 2024 11:25
@Veykril
Copy link
Member

Veykril commented Dec 30, 2024

Thanks! It is a bit odd that we apparently hit the single token case there. Our upmapping probably needs some improvement there still (or we get confused by tokio's span re-usage)

@Veykril Veykril added this pull request to the merge queue Dec 30, 2024
@1hakusai1
Copy link
Contributor Author

1hakusai1 commented Dec 30, 2024

Thanks!

It is a bit odd that we apparently hit the single token case there.

Yes. SemanticsImpl::original_range_opt and parse_macro_expansion may not work in some cases. (However, I could not find where the problem is.)

Merged via the queue into rust-lang:master with commit bd083d0 Dec 30, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code action "fill match arms" adds extra } inside #[tokio::main]
3 participants