rust/library
Samuel Tardieu 1724af9f1e
Rollup merge of #144872 - connortsui20:once-poison-docs, r=Amanieu
Document Poisoning in `LazyCell` and `LazyLock`

Currently, there is no documentation of poisoning behavior in either `LazyCell` or `LazyLock`, even though both of them can be observed as poisoned by users.

`LazyCell` [plagyround example](https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=9cf38b8dc56db100848f54085c2c697d)

`LazyLock` [playground example](https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=f1cd6f9fe16636e347ebb695a0ce30c0)

# Open Questions

- [x] Is it worth making the implementation of `LazyLock` more complicated to ensure that the the panic message is `"LazyLock instance has previously been poisoned"` instead of `"Once instance has previously been poisoned"`? See the `LazyLock` playground link above for more context.
- [x] Does it make sense to move `LazyLock` into the `poison` module? It is certainly a poison-able type, but at the same time it is slightly different from the 4 other types currently in the `poison` module in that it is unrecoverable. I think this is more of a libs-api question.

``@rustbot`` label +T-libs-api

Please let me know if these open questions deserve a separate issue / PR!
2025-08-05 03:51:38 +02:00
..
alloc Rollup merge of #144478 - joshtriplett:doc-code-formatting-prep, r=Amanieu 2025-08-02 11:24:24 +02:00
alloctests Add test for int_format_into feature 2025-07-03 18:57:16 +02:00
backtrace@b65ab935fb Update the backtrace submodule 2025-06-16 07:00:13 +00:00
compiler-builtins Merge ref '82310651b9' from rust-lang/rust 2025-07-18 19:06:49 +00:00
core Rollup merge of #144872 - connortsui20:once-poison-docs, r=Amanieu 2025-08-05 03:51:38 +02:00
coretests Constify additional Result functions 2025-08-01 08:55:50 +03:00
panic_abort Use core via rustc-std-workspace-core in library/panic* 2025-07-31 22:47:24 +00:00
panic_unwind Use core via rustc-std-workspace-core in library/panic* 2025-07-31 22:47:24 +00:00
portable-simd use div_ceil instead of manual logic 2025-07-05 10:55:42 +02:00
proc_macro Rollup merge of #143631 - hkBst:update-escaper-2, r=compiler-errors 2025-07-17 10:41:45 +02:00
profiler_builtins Fix profiler_builtins build script to handle full path to profiler lib 2025-04-11 16:57:38 +02:00
rtstartup Update cfg(bootstrap) 2025-07-01 10:55:49 -07:00
rustc-std-workspace-alloc Disable unit tests for stdlib packages that don't contain any 2025-07-24 09:15:28 +00:00
rustc-std-workspace-core Use core via rustc-std-workspace-core in library/panic* 2025-07-31 22:47:24 +00:00
rustc-std-workspace-std Disable unit tests for stdlib packages that don't contain any 2025-07-24 09:15:28 +00:00
std Rollup merge of #144872 - connortsui20:once-poison-docs, r=Amanieu 2025-08-05 03:51:38 +02:00
std_detect std_detect: Linux 6.16 support for RISC-V 2025-07-31 07:39:10 +00:00
stdarch Auto merge of #144225 - purplesyringa:unwinding-intrinsics, r=nikic 2025-07-27 23:05:48 +00:00
sysroot Rollup merge of #144399 - bjorn3:stdlib_tests_separate_packages, r=Mark-Simulacrum 2025-07-28 08:36:53 +02:00
test Make libtest::ERROR_EXIT_CODE const public to not redefine it in rustdoc 2025-07-31 10:44:50 +02:00
unwind Use core via rustc-std-workspace-core in library/panic* 2025-07-31 22:47:24 +00:00
windows_targets Rollup merge of #144399 - bjorn3:stdlib_tests_separate_packages, r=Mark-Simulacrum 2025-07-28 08:36:53 +02:00
Cargo.lock cargo update 2025-08-03 00:27:18 +00:00
Cargo.toml Auto merge of #140999 - hkBst:update-escaper, r=nnethercote 2025-06-25 01:03:30 +00:00