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

Correctly handle inlining of async fn #15074

Merged
merged 2 commits into from Jun 19, 2023

Conversation

oxalica
Copy link
Contributor

@oxalica oxalica commented Jun 18, 2023

Fixes #10198

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 18, 2023
@lowr
Copy link
Contributor

lowr commented Jun 19, 2023

I think this is good to go modulo one nit: can you remove StmtList::push_front() now that it's unused?

@oxalica
Copy link
Contributor Author

oxalica commented Jun 19, 2023

I think this is good to go modulo one nit: can you remove StmtList::push_front() now that it's unused?

Done. Seems it's pub fn thus not caught by rustc. 🤔 Not sure if there's a way to mark "internal crates" for better dead code checking.

@lowr
Copy link
Contributor

lowr commented Jun 19, 2023

Yeah I'd love to have such marker, but I guess it's not really possible when any crates outside a workspace could depend on those internal crates via git dependencies in Cargo.toml (in that sense, it's a bit off to purge pub items as soon as they become unused in our codebase, but I tend to just remove them 😅 ).

Anyway this PR looks great, thanks!
@bors r+

@bors
Copy link
Collaborator

bors commented Jun 19, 2023

📌 Commit 2cd7b0c has been approved by lowr

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Jun 19, 2023

⌛ Testing commit 2cd7b0c with merge f993485...

@bors
Copy link
Collaborator

bors commented Jun 19, 2023

☀️ Test successful - checks-actions
Approved by: lowr
Pushing f993485 to master...

@bors bors merged commit f993485 into rust-lang:master Jun 19, 2023
9 of 10 checks passed
@oxalica oxalica deleted the fix/inline-async-fn branch June 19, 2023 23:00
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.

Inline function adds invalid .await
4 participants