diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2023-10-14 22:35:05 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-14 22:35:05 +0200 |
| commit | fcd75ccc90c23a7d669929e983c47ac0157a6d69 (patch) | |
| tree | 990a41cbc4a535d69c1eb4ad8ced1ae86a0e88aa /compiler/rustc_codegen_gcc/src/errors.rs | |
| parent | ee8c9d3c34719a129f280cd91ba5d324017bb02b (diff) | |
| parent | dd34d9027af3c0286aa038a365ff14387a6bf80c (diff) | |
| download | rust-fcd75ccc90c23a7d669929e983c47ac0157a6d69.tar.gz rust-fcd75ccc90c23a7d669929e983c47ac0157a6d69.zip | |
Rollup merge of #116540 - daxpedda:once-cell-lock-try-insert, r=Mark-Simulacrum
Implement `OnceCell/Lock::try_insert()` I took inspiration from [`once_cell`](https://crates.io/crates/once_cell): - [`once_cell::unsync::OnceCell::try_insert()`](https://github.com/matklad/once_cell/blob/874f9373abd7feaf923a3b3c34bfb3383529c671/src/lib.rs#L551-L563) - [`once_cell::sync::OnceCell::try_insert()`](https://github.com/matklad/once_cell/blob/874f9373abd7feaf923a3b3c34bfb3383529c671/src/lib.rs#L1080-L1087) I tried to change as little code as possible in the first commit and applied some obvious optimizations in the second one. ACP: https://github.com/rust-lang/libs-team/issues/276 Tracking issue: #116693
Diffstat (limited to 'compiler/rustc_codegen_gcc/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
