Skip to content

Conversation

profetia
Copy link
Contributor

@profetia profetia commented Aug 25, 2025

Closes #15552

changelog: [async_yields_async] fix wrong unmangle of macros

@rustbot
Copy link
Collaborator

rustbot commented Aug 25, 2025

r? @Jarcho

rustbot has assigned @Jarcho.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 25, 2025
Copy link
Member

@samueltardieu samueltardieu left a comment

Choose a reason for hiding this comment

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

This is not directly linked to macros, but what if the return_expr requires parenthesis around it before applying .await?

                            format!("{}.await", snippet(cx, return_expr_span, "..")),

Shouldn't this use Sugg and Sugg::maybe_paren() here?

For example:

impl std::ops::Add for CustomFutureType {
    type Output = Self;

    fn add(self, other: Self) -> Self {
        Self
    }
}
    let _ = async || {
        CustomFutureType + CustomFutureType
    };

will not be processed properly.

If you don't mind, could you also fix this?

r? samueltardieu

@rustbot rustbot assigned samueltardieu and unassigned Jarcho Aug 25, 2025
@profetia
Copy link
Contributor Author

@samueltardieu Done. Thank you!

@samueltardieu
Copy link
Member

Can you squash the changes (and fix the CI of course)? Then it's good for me.

@profetia
Copy link
Contributor Author

Done. Thank you!

@profetia profetia requested a review from samueltardieu August 25, 2025 16:06
Copy link
Member

@samueltardieu samueltardieu left a comment

Choose a reason for hiding this comment

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

Some small changes left.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Aug 25, 2025
@profetia profetia requested a review from samueltardieu August 25, 2025 16:57
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties and removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Aug 25, 2025
@samueltardieu samueltardieu added this pull request to the merge queue Aug 25, 2025
Merged via the queue into rust-lang:master with commit f0514d9 Aug 25, 2025
11 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 25, 2025
@profetia profetia deleted the issue15552 branch September 12, 2025 01:23
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.

async_yields_async wrongly unmangled macros

4 participants