Skip to content

Conversation

GuillaumeGomez
Copy link
Member

Fixes #139839.

It was just missing a string comparison with async gen.

@rustbot
Copy link
Collaborator

rustbot commented Apr 15, 2025

r? @wesleywiser

rustbot has assigned @wesleywiser.
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 S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 15, 2025
@GuillaumeGomez
Copy link
Member Author

@compiler-errors implemented this feature so let's set them as reviewer.

r? compiler-errors

@compiler-errors
Copy link
Member

Tests are typically put into a subdirectory of ui/ rather than the top. Could you move it? There's the async-await/ dir, which probably has a subdirectory inside of that for async gen stuff.

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 15, 2025
@rustbot
Copy link
Collaborator

rustbot commented Apr 15, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@compiler-errors
Copy link
Member

Also squash this into one commit please

let coro_prefix = if string.starts_with("async") {
// `async` is 5 chars long. Not using `.len()` to avoid the cast from `usize`
// to `u32`.
let coro_prefix = if string.starts_with("async gen") {
Copy link
Member

Choose a reason for hiding this comment

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

Also this is still broken b/c it doesn't take into account the fact that the rendered source may have spaces async gen {}

Copy link
Member Author

Choose a reason for hiding this comment

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

Arf good catch, should have thought about that. Gonna add a test for this case too.

@GuillaumeGomez
Copy link
Member Author

@rustbot ready

@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 (such as code changes or more information) from the author. labels Apr 15, 2025
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member Author

Ah right, tab characters are triggering tidy. Well, backline and whitespace should hopefully be enough.

@compiler-errors
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Apr 16, 2025

📌 Commit 2020adb has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 16, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Apr 16, 2025
…ompiler-errors

Fix wrong "move keyword" suggestion for async gen block

Fixes rust-lang#139839.

It was just missing a string comparison with `async gen`.
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 16, 2025
Rollup of 8 pull requests

Successful merges:

 - rust-lang#136926 (Stabilize `-Zdwarf-version` as `-Cdwarf-version`)
 - rust-lang#139647 (Add unstable parsing of `--extern foo::bar=libbar.rlib` command line options)
 - rust-lang#139853 (Disable combining LLD with external llvm-config)
 - rust-lang#139867 (Fix some tidy paper cuts)
 - rust-lang#139871 (Fix wrong "move keyword" suggestion for async gen block)
 - rust-lang#139880 (Don't compute name of associated item if it's an RPITIT)
 - rust-lang#139884 (Update books)
 - rust-lang#139886 (`borrowck_graphviz_*` attribute tweaks)

r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Apr 16, 2025
…ompiler-errors

Fix wrong "move keyword" suggestion for async gen block

Fixes rust-lang#139839.

It was just missing a string comparison with `async gen`.
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 16, 2025
Rollup of 10 pull requests

Successful merges:

 - rust-lang#139647 (Add unstable parsing of `--extern foo::bar=libbar.rlib` command line options)
 - rust-lang#139823 (Fix some bootstrap papercuts)
 - rust-lang#139853 (Disable combining LLD with external llvm-config)
 - rust-lang#139867 (Fix some tidy paper cuts)
 - rust-lang#139871 (Fix wrong "move keyword" suggestion for async gen block)
 - rust-lang#139876 (Make CodeStats' type_sizes public)
 - rust-lang#139880 (Don't compute name of associated item if it's an RPITIT)
 - rust-lang#139884 (Update books)
 - rust-lang#139886 (`borrowck_graphviz_*` attribute tweaks)
 - rust-lang#139893 (Add test for issue 125668)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 16, 2025
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#139647 (Add unstable parsing of `--extern foo::bar=libbar.rlib` command line options)
 - rust-lang#139823 (Fix some bootstrap papercuts)
 - rust-lang#139867 (Fix some tidy paper cuts)
 - rust-lang#139871 (Fix wrong "move keyword" suggestion for async gen block)
 - rust-lang#139876 (Make CodeStats' type_sizes public)
 - rust-lang#139880 (Don't compute name of associated item if it's an RPITIT)
 - rust-lang#139884 (Update books)
 - rust-lang#139886 (`borrowck_graphviz_*` attribute tweaks)
 - rust-lang#139893 (Add test for issue 125668)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 16, 2025
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#139647 (Add unstable parsing of `--extern foo::bar=libbar.rlib` command line options)
 - rust-lang#139823 (Fix some bootstrap papercuts)
 - rust-lang#139867 (Fix some tidy paper cuts)
 - rust-lang#139871 (Fix wrong "move keyword" suggestion for async gen block)
 - rust-lang#139876 (Make CodeStats' type_sizes public)
 - rust-lang#139880 (Don't compute name of associated item if it's an RPITIT)
 - rust-lang#139884 (Update books)
 - rust-lang#139886 (`borrowck_graphviz_*` attribute tweaks)
 - rust-lang#139893 (Add test for issue 125668)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit a1de2a2 into rust-lang:master Apr 16, 2025
6 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 16, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 16, 2025
Rollup merge of rust-lang#139871 - GuillaumeGomez:async-gen-move, r=compiler-errors

Fix wrong "move keyword" suggestion for async gen block

Fixes rust-lang#139839.

It was just missing a string comparison with `async gen`.
@GuillaumeGomez GuillaumeGomez deleted the async-gen-move branch April 17, 2025 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wrong help message
6 participants