This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 02ae58c
authored
Unrolled build for rust-lang#131457
Rollup merge of rust-lang#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`: rust-lang#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 rust-lang#118833).1 file changed
+34
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2107 | 2107 | | |
2108 | 2108 | | |
2109 | 2109 | | |
2110 | | - | |
2111 | | - | |
2112 | | - | |
2113 | | - | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
| 2116 | + | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
2114 | 2142 | | |
2115 | | - | |
2116 | | - | |
2117 | 2143 | | |
2118 | 2144 | | |
2119 | 2145 | | |
| |||
2125 | 2151 | | |
2126 | 2152 | | |
2127 | 2153 | | |
| 2154 | + | |
| 2155 | + | |
2128 | 2156 | | |
2129 | 2157 | | |
2130 | 2158 | | |
| |||
0 commit comments