-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Fix wrong "move keyword" suggestion for async gen block #139871
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
Conversation
r? @wesleywiser rustbot has assigned @wesleywiser. Use |
@compiler-errors implemented this feature so let's set them as reviewer. r? compiler-errors |
Tests are typically put into a subdirectory of @rustbot author |
Reminder, once the PR becomes ready for a review, use |
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") { |
There was a problem hiding this comment.
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 {}
There was a problem hiding this comment.
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.
40cedf7
to
64eb406
Compare
@rustbot ready |
This comment has been minimized.
This comment has been minimized.
64eb406
to
2020adb
Compare
Ah right, tab characters are triggering |
@bors r+ rollup |
…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`.
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
…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`.
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
…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
…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
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`.
Fixes #139839.
It was just missing a string comparison with
async gen
.