about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src
diff options
context:
space:
mode:
authorJubilee <workingjubilee@gmail.com>2024-10-24 23:23:54 -0700
committerGitHub <noreply@github.com>2024-10-24 23:23:54 -0700
commitfd78b671a88a8b5c3470234bcd52a84fc552d510 (patch)
treed7e5341d7c7b591cc1d4bb79c1291a5978b9ed69 /compiler/rustc_mir_transform/src
parent788202a2cef5dde0743490fd51515f373d4207a6 (diff)
parent5280f152b0dad9faf33478a06c6a1cdf97b71ae4 (diff)
downloadrust-fd78b671a88a8b5c3470234bcd52a84fc552d510.tar.gz
rust-fd78b671a88a8b5c3470234bcd52a84fc552d510.zip
Rollup merge of #131457 - kpreid:fnaddr, r=dtolnay
Expand `ptr::fn_addr_eq()` documentation.

* Describe more clearly what is (not) guaranteed, and de-emphasize the description of rustc implementation details.
* Explain what you *can* reliably use it for.

Tracking issue for `ptr_fn_addr_eq`: #129322

The motivation for this PR is that I just learned that `ptr::fn_addr_eq()` exists, read the documentation, and thought: “*I* know what this means, but someone not already familiar with how `rustc` works could be left wondering whether this is even good for anything.” Fixing that seems especially important if we’re going to recommend people use it instead of `==` (as per #118833).
Diffstat (limited to 'compiler/rustc_mir_transform/src')
0 files changed, 0 insertions, 0 deletions