Skip to content

Rollup of 9 pull requests #141674

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

Closed
wants to merge 35 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
b21c9e7
Split `autodiff` into `autodiff_forward` and `autodiff_reverse`
Sa4dUs May 6, 2025
9efad3a
Add data_ptr method to Mutex and RwLock
jplatte Apr 27, 2025
9d6c5a8
Add more docs to new data_ptr methods
jplatte May 21, 2025
20589bd
Add ReentrantLock::data_ptr
jplatte May 21, 2025
b725cf6
Disable autodiff bootstrapping
Sa4dUs May 10, 2025
2041de7
Update codegen and pretty tests
Sa4dUs May 10, 2025
f92d84c
Initial naive implementation using `Symbols` to represent autodiff mo…
Sa4dUs May 10, 2025
8dd62e8
Update UI tests
Sa4dUs May 10, 2025
8917ff6
Update generic tests
Sa4dUs May 20, 2025
1e9e177
Move some code around in codegen_call_terminator
bjorn3 May 21, 2025
e4700e7
Always use fn_span in codegen_call_terminator
bjorn3 May 22, 2025
c83358b
Move caller_location handling into codegen_intrinsic_call
bjorn3 May 22, 2025
6016f84
Pass PlaceRef rather than Bx::Value to codegen_intrinsic_call
bjorn3 May 22, 2025
0a14e1b
Remove usage of FnAbi in codegen_intrinsic_call
bjorn3 May 22, 2025
7122648
Don't depend on FnAbi for intrinsics
bjorn3 May 22, 2025
165fb98
Reduce indentation in codegen_panic_intrinsic
bjorn3 May 23, 2025
7aef56d
Call out possibility of invariant result
jhpratt May 26, 2025
c6c2fde
Minor macro docs fixes
Sa4dUs May 26, 2025
df09fed
Remove `DropNodeKey::kind`.
nnethercote May 20, 2025
bf4532c
Rename `DropTree::drops` as `DropTree::drop_nodes`.
nnethercote May 20, 2025
84bb48f
Factor out some repeated code in `build_exit_tree`.
nnethercote May 20, 2025
ec8baa5
Avoid `fold`/`flat_map`.
nnethercote May 20, 2025
f83ecd8
Refactor the two-phase check for impls and impl items
mu001999 May 22, 2025
871327e
rustdoc: linking to a local proc macro no longer warns
lolbinarycat May 22, 2025
e908094
consider glob imports in cfg suggestion
bvanjoi May 25, 2025
adcd0bf
Fix ICE in tokenstream with contracts from parser recovery
chenyukang May 28, 2025
dd6473d
Rollup merge of #140369 - jplatte:mutex-rwlock-data-ptr, r=Amanieu
jhpratt May 28, 2025
cdb16d3
Rollup merge of #140697 - Sa4dUs:split-autodiff, r=ZuseZ4
jhpratt May 28, 2025
c17284e
Rollup merge of #141404 - bjorn3:refactor_cg_ssa_call_codegen, r=davi…
jhpratt May 28, 2025
ee9bcfc
Rollup merge of #141407 - mu001999-contrib:dead-code/refactor, r=petr…
jhpratt May 28, 2025
c4fe0a5
Rollup merge of #141411 - lolbinarycat:rustdoc-link-proc-macro-91274,…
jhpratt May 28, 2025
768352a
Rollup merge of #141548 - bvanjoi:issue-141256, r=petrochenkov
jhpratt May 28, 2025
92f05f0
Rollup merge of #141612 - jhpratt:phantom-docs, r=tgross35
jhpratt May 28, 2025
d6ef1e6
Rollup merge of #141627 - nnethercote:drop-cleanups, r=matthewjasper
jhpratt May 28, 2025
4061118
Rollup merge of #141670 - chenyukang:yukang-fix-ice-from-contracts, r…
jhpratt May 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add ReentrantLock::data_ptr
  • Loading branch information
jplatte committed May 21, 2025
commit 20589bd6050ff9596348c751231ac84b7538adb4
11 changes: 11 additions & 0 deletions library/std/src/sync/reentrant_lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,17 @@ impl<T: ?Sized> ReentrantLock<T> {
}
}

/// Returns a raw pointer to the underlying data.
///
/// The returned pointer is always non-null and properly aligned, but it is
/// the user's responsibility to ensure that any reads through it are
/// properly synchronized to avoid data races, and that it is not read
/// through after the lock is dropped.
#[unstable(feature = "reentrant_lock_data_ptr", issue = "140368")]
pub fn data_ptr(&self) -> *const T {
&raw const self.data
}

unsafe fn increment_lock_count(&self) -> Option<()> {
unsafe {
*self.lock_count.get() = (*self.lock_count.get()).checked_add(1)?;
Expand Down
Loading