Commit 85d15d2
authored
Rollup merge of #129653 - RalfJung:addr-of-read-only, r=scottmcm
clarify that addr_of creates read-only pointers
Stacked Borrows does make this UB, but Tree Borrows does not. This is tied up with #56604 and other UCG discussions. Also see [this collection of links](Rust-for-Linux/linux#950 (comment)) where rustc treats `addr_of!` as a "non-mutating use".
So, let's better be careful for now.1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2277 | 2277 | | |
2278 | 2278 | | |
2279 | 2279 | | |
| 2280 | + | |
| 2281 | + | |
| 2282 | + | |
| 2283 | + | |
| 2284 | + | |
| 2285 | + | |
| 2286 | + | |
| 2287 | + | |
2280 | 2288 | | |
2281 | 2289 | | |
2282 | 2290 | | |
| |||
0 commit comments