-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
coverage: Improve handling of function/closure spans #120569
Conversation
r? @TaKO8Ki (rustbot has picked a reviewer for you, use r? to override) |
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened. |
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#119543 (add avx512fp16 to x86 target features) - rust-lang#120004 (Release notes for 1.76) - rust-lang#120562 (Revert unsound libcore changes) - rust-lang#120566 (coverage: Use normal `edition:` headers in coverage tests) - rust-lang#120570 (Suggest changing type to const parameters if we encounter a type in the trait bound position) - rust-lang#120571 (Miscellaneous diagnostics cleanups) - rust-lang#120573 (Remove `BorrowckErrors::tainted_by_errors`) - rust-lang#120592 (Remove unnecessary `.to_string()`/`.as_str()`s) - rust-lang#120610 (hir: Remove the generic type parameter from `MaybeOwned`) - rust-lang#120616 (Fix ICE on field access on a tainted type after const-eval failure) Failed merges: - rust-lang#120569 (coverage: Improve handling of function/closure spans) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#119543 (add avx512fp16 to x86 target features) - rust-lang#120004 (Release notes for 1.76) - rust-lang#120562 (Revert unsound libcore changes) - rust-lang#120566 (coverage: Use normal `edition:` headers in coverage tests) - rust-lang#120570 (Suggest changing type to const parameters if we encounter a type in the trait bound position) - rust-lang#120571 (Miscellaneous diagnostics cleanups) - rust-lang#120573 (Remove `BorrowckErrors::tainted_by_errors`) - rust-lang#120592 (Remove unnecessary `.to_string()`/`.as_str()`s) - rust-lang#120610 (hir: Remove the generic type parameter from `MaybeOwned`) - rust-lang#120616 (Fix ICE on field access on a tainted type after const-eval failure) Failed merges: - rust-lang#120569 (coverage: Improve handling of function/closure spans) r? `@ghost` `@rustbot` modify labels: rollup
☔ The latest upstream changes (presumably #120620) made this pull request unmergeable. Please resolve the merge conflicts. |
This improves the coverage instrumentation of closures declared in macros, as seen in `closure_macro.rs` and `closure_macro_async.rs`.
This sidesteps the normal span refinement code in cases where we know that we are only dealing with the special signature span that represents having called an async function.
Rebased to resolve trivial conflict in a test file; no functional changes. |
@rustbot ready |
@bors r+ |
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#119481 (Clarify ambiguity in select_nth_unstable docs) - rust-lang#119600 (Remove outdated references to librustc_middle) - rust-lang#120458 (Document `&CStr` to `CString` conversion) - rust-lang#120569 (coverage: Improve handling of function/closure spans) - rust-lang#120572 (Update libc to 0.2.153) - rust-lang#120587 (miri: normalize struct tail in ABI compat check) - rust-lang#120607 (fix rust-lang#120603 by adding a check in default_read_buf) - rust-lang#120636 (Subtree update of `rust-analyzer`) - rust-lang#120641 (rustdoc: trait.impl, type.impl: sort impls to make it not depend on serialization order) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#120569 - Zalathar:fn-sig, r=oli-obk coverage: Improve handling of function/closure spans This is a combination of some loosely-related changes that touch the same code: 1. Make unexpansion of closure bodies more precise, by unexpanding back to the context of the closure declaration, instead of unexpanding all the way back to the top-level context. This preserves the way we handle async desugaring and closures containing a single bang-macro, while also giving better results for closures defined in macros. 2. Skip the normal span-refinement code when dealing with the trivial outer part of an async function. 3. Be more explicit about the fact that `fn_sig_span` has been extended to the start of the function body, and is not necessarily present. --- `@rustbot` label +A-code-coverage
This is a combination of some loosely-related changes that touch the same code:
fn_sig_span
has been extended to the start of the function body, and is not necessarily present.@rustbot label +A-code-coverage