about summary refs log tree commit diff
path: root/tests/coverage/async.rs
AgeCommit message (Collapse)AuthorLines
2025-09-01pub async fn implementation coroutine (func::{closure#0}) is monomorphized, ↵Andrew Zhogin-1/+1
when func itself is monomorphized
2024-12-23Revert "Auto merge of #130766 - clarfonthey:stable-coverage-attribute, ↵Zalathar-0/+1
r=wesleywiser" This reverts commit 1d35638dc38dbfbf1cc2a9823135dfcf3c650169, reversing changes made to f23a80a4c2fbca593b64e70f5970368824b4c5e9.
2024-12-16Stabilize #[coverage] attributeltdk-1/+0
2024-12-05Stabilize noop_wakerEric Holk-1/+0
Co-authored-by: zachs18 <8355914+zachs18@users.noreply.github.com>
2024-09-10coverage: Extract `executor::block_on` from several async coverage testsZalathar-18/+3
By moving `block_on` to an auxiliary crate, we avoid having to keep a separate copy of it in every async test. (This also incorporates some small tweaks to the headers in `await_ready.rs`.)
2024-07-08coverage: Extract hole spans from HIR instead of MIRZalathar-9/+1
This makes it possible to treat more kinds of nested item/code as holes, instead of being restricted to closures.
2024-02-22[AUTO_GENERATED] Migrate compiletest to use `ui_test`-style `//@` directives许杰友 Jieyou Xu (Joe)-2/+2
2024-01-21Rollup merge of #120015 - Zalathar:format, r=dtolnayNadrieril-0/+2
coverage: Format all coverage tests with `rustfmt` As suggested by <https://github.com/rust-lang/rust/pull/119984#discussion_r1452856806>. Test files in `tests/` are normally ignored by `x fmt`, but sometimes those files end up being run through `rustfmt` anyway, either by `rust-analyzer` or by hand. When that happens, it's annoying to have to manually revert formatting changes that are unrelated to the actual changes being made. So it's helpful for the tests in the repository to already have standard formatting beforehand. However, there are several coverage tests that deliberately use non-standard formatting, so that line counts reveal more information about where code regions begin and end. In those cases, we can use `#[rustfmt::skip]` to prevent that code from being disturbed. ``@rustbot`` label +A-code-coverage
2024-01-17Remove unnecessary `let`s and borrowing from `Waker::noop()` usage.Kevin Reid-2/+1
`Waker::noop()` now returns a `&'static Waker` reference, so it can be passed directly to `Context` creation with no temporary lifetime issue.
2024-01-16coverage: Add `#[rustfmt::skip]` to tests with non-standard formattingZalathar-0/+2
These tests deliberately use non-standard formatting, so that the line execution counts reported by `llvm-cov` reveal additional information about where code regions begin and end.
2023-12-15coverage: Use `Waker::noop` in async testsZalathar-16/+10
2023-11-07coverage: Migrate `tests/run-coverage` into `tests/coverage`Zalathar-0/+128