-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Uplift some miscellaneous coroutine-specific machinery into check_closure
#119417
Conversation
r? @davidtwco (rustbot has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
d4c8920
to
7eeaaa2
Compare
@@ -35,16 +35,16 @@ LL | async gen {}; | |||
= help: add `#![feature(gen_blocks)]` to the crate attributes to enable | |||
|
|||
error[E0282]: type annotations needed | |||
--> $DIR/feature-gate-gen_blocks.rs:5:9 | |||
--> $DIR/feature-gate-gen_blocks.rs:5:5 | |||
| | |||
LL | 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.
This is the span of the yield type variable. We're just using the whole span instead of the body's span. I don't think it matters here, because neither span is actually the most precise one to point at for "ambiguous yield type"... 🤷
@bors r+ rollup |
🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened. |
…r=davidtwco Uplift some miscellaneous coroutine-specific machinery into `check_closure` This PR uplifts some of the logic in `check_fn` that is specific to checking coroutines, which always flows through `check_closure`. This is just some miscellaneous clean up that I've wanted to do, especially because I'm poking around this code to make it work for async closures.
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#119184 (Switch from using `//~ERROR` annotations with `--error-format` to `error-pattern`) - rust-lang#119325 (custom mir: make it clear what the return block is) - rust-lang#119391 (Use Result::flatten in catch_with_exit_code) - rust-lang#119397 (Recover parentheses in range patterns) - rust-lang#119414 (bootstrap: Move -Clto= setting from Rustc::run to rustc_cargo) - rust-lang#119417 (Uplift some miscellaneous coroutine-specific machinery into `check_closure`) - rust-lang#119527 (don't reexport atomic::ordering via rustc_data_structures, use std import) - rust-lang#119540 (Don't synthesize host effect args inside trait object types) r? `@ghost` `@rustbot` modify labels: rollup
…r=davidtwco Uplift some miscellaneous coroutine-specific machinery into `check_closure` This PR uplifts some of the logic in `check_fn` that is specific to checking coroutines, which always flows through `check_closure`. This is just some miscellaneous clean up that I've wanted to do, especially because I'm poking around this code to make it work for async closures.
…mpiler-errors Rollup of 10 pull requests Successful merges: - rust-lang#118521 (Enable address sanitizer for MSVC targets using INFERASANLIBS linker flag) - rust-lang#119026 (std::net::bind using -1 for openbsd which in turn sets it to somaxconn.) - rust-lang#119195 (Make named_asm_labels lint not trigger on unicode and trigger on format args) - rust-lang#119204 (macro_rules: Less hacky heuristic for using `tt` metavariable spans) - rust-lang#119362 (Make `derive(Trait)` suggestion more accurate) - rust-lang#119397 (Recover parentheses in range patterns) - rust-lang#119414 (bootstrap: Move -Clto= setting from Rustc::run to rustc_cargo) - rust-lang#119417 (Uplift some miscellaneous coroutine-specific machinery into `check_closure`) - rust-lang#119540 (Don't synthesize host effect args inside trait object types) - rust-lang#119555 (Add codegen test for RVO on MaybeUninit) r? `@ghost` `@rustbot` modify labels: rollup
…mpiler-errors Rollup of 10 pull requests Successful merges: - rust-lang#118521 (Enable address sanitizer for MSVC targets using INFERASANLIBS linker flag) - rust-lang#119026 (std::net::bind using -1 for openbsd which in turn sets it to somaxconn.) - rust-lang#119195 (Make named_asm_labels lint not trigger on unicode and trigger on format args) - rust-lang#119204 (macro_rules: Less hacky heuristic for using `tt` metavariable spans) - rust-lang#119362 (Make `derive(Trait)` suggestion more accurate) - rust-lang#119397 (Recover parentheses in range patterns) - rust-lang#119414 (bootstrap: Move -Clto= setting from Rustc::run to rustc_cargo) - rust-lang#119417 (Uplift some miscellaneous coroutine-specific machinery into `check_closure`) - rust-lang#119540 (Don't synthesize host effect args inside trait object types) - rust-lang#119555 (Add codegen test for RVO on MaybeUninit) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#118521 (Enable address sanitizer for MSVC targets using INFERASANLIBS linker flag) - rust-lang#119026 (std::net::bind using -1 for openbsd which in turn sets it to somaxconn.) - rust-lang#119195 (Make named_asm_labels lint not trigger on unicode and trigger on format args) - rust-lang#119204 (macro_rules: Less hacky heuristic for using `tt` metavariable spans) - rust-lang#119362 (Make `derive(Trait)` suggestion more accurate) - rust-lang#119397 (Recover parentheses in range patterns) - rust-lang#119417 (Uplift some miscellaneous coroutine-specific machinery into `check_closure`) - rust-lang#119539 (Fix typos) - rust-lang#119540 (Don't synthesize host effect args inside trait object types) - rust-lang#119555 (Add codegen test for RVO on MaybeUninit) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#118521 (Enable address sanitizer for MSVC targets using INFERASANLIBS linker flag) - rust-lang#119026 (std::net::bind using -1 for openbsd which in turn sets it to somaxconn.) - rust-lang#119195 (Make named_asm_labels lint not trigger on unicode and trigger on format args) - rust-lang#119204 (macro_rules: Less hacky heuristic for using `tt` metavariable spans) - rust-lang#119362 (Make `derive(Trait)` suggestion more accurate) - rust-lang#119397 (Recover parentheses in range patterns) - rust-lang#119417 (Uplift some miscellaneous coroutine-specific machinery into `check_closure`) - rust-lang#119539 (Fix typos) - rust-lang#119540 (Don't synthesize host effect args inside trait object types) - rust-lang#119555 (Add codegen test for RVO on MaybeUninit) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#118521 (Enable address sanitizer for MSVC targets using INFERASANLIBS linker flag) - rust-lang#119026 (std::net::bind using -1 for openbsd which in turn sets it to somaxconn.) - rust-lang#119195 (Make named_asm_labels lint not trigger on unicode and trigger on format args) - rust-lang#119204 (macro_rules: Less hacky heuristic for using `tt` metavariable spans) - rust-lang#119362 (Make `derive(Trait)` suggestion more accurate) - rust-lang#119397 (Recover parentheses in range patterns) - rust-lang#119417 (Uplift some miscellaneous coroutine-specific machinery into `check_closure`) - rust-lang#119539 (Fix typos) - rust-lang#119540 (Don't synthesize host effect args inside trait object types) - rust-lang#119555 (Add codegen test for RVO on MaybeUninit) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#119417 - compiler-errors:closure-checking, r=davidtwco Uplift some miscellaneous coroutine-specific machinery into `check_closure` This PR uplifts some of the logic in `check_fn` that is specific to checking coroutines, which always flows through `check_closure`. This is just some miscellaneous clean up that I've wanted to do, especially because I'm poking around this code to make it work for async closures.
This PR uplifts some of the logic in
check_fn
that is specific to checking coroutines, which always flows throughcheck_closure
.This is just some miscellaneous clean up that I've wanted to do, especially because I'm poking around this code to make it work for async closures.