about summary refs log tree commit diff
path: root/tests/coverage/branch/lazy-boolean.rs
diff options
context:
space:
mode:
authorStuart Cook <Zalathar@users.noreply.github.com>2025-07-29 20:19:48 +1000
committerGitHub <noreply@github.com>2025-07-29 20:19:48 +1000
commit4bc1b98e15a1279e79f91eb5188a52bddb117147 (patch)
treeb166e68f097c790fff10d71bd999ad0be9200c07 /tests/coverage/branch/lazy-boolean.rs
parent552904134b564a74489db50aebe7070fdcce895c (diff)
parentd073d297b65f8cc0c8b75249b74c7df5a3dc18bc (diff)
downloadrust-4bc1b98e15a1279e79f91eb5188a52bddb117147.tar.gz
rust-4bc1b98e15a1279e79f91eb5188a52bddb117147.zip
Rollup merge of #144022 - connortsui20:sync_nonpoison, r=tgross35
Implementation: `#[feature(sync_nonpoison)]`, `#[feature(nonpoison_mutex)]`

Continuation of https://github.com/rust-lang/rust/pull/134663

Tracking Issue: https://github.com/rust-lang/rust/issues/134645

This PR implements a new `sync/nonpoison` module, as well as the `nonpoison` variant of the `Mutex` lock.

There are 2 main changes here, the first is the new `nonpoison::mutex` module, and the second is the `mutex` integration tests.

For the `nonpoison::mutex` module, I did my best to align it with the current state of the `poison::mutex` module. This means that several unstable features (`mapped_lock_guards`, `lock_value_accessors`, and `mutex_data_ptr`) are also in the new `nonpoison::mutex` module, under their respective feature gates. Everything else in that file is under the correct feature gate (`#[unstable(feature = "nonpoison_mutex", issue = "134645")]`).

Everything in the `nonpoison::mutex` file is essentially identical in spirit, as we are simply removing the error case from the original `poison::mutex`.

The second big change is in the integration tests. I created a macro called that allows us to duplicate tests that are "generic" over the different mutex types, in that the poison mutex is always `unwrap`ped.

~~I think that there is an argument against doing this, as it can make the tests a bit harder to understand (and language server capabilities are weaker within macros), but I think the benefit of code deduplication here is worth it. Note that it is definitely possible to generalize this (with a few tweaks) to testing the other `nonpoison` locks when they eventually get implemented, but I'll leave that for a later discussion.~~
Diffstat (limited to 'tests/coverage/branch/lazy-boolean.rs')
0 files changed, 0 insertions, 0 deletions