Uh oh!
There was an error while loading. Please reload this page.
mention provenance in the pointer::wrapping_offset docs - #139192
Conversation
rustbot
commented
Mar 31, 2025
rustbot has assigned @workingjubilee. Use |
| /// This operation itself is always safe, but using the resulting pointer is not. | ||
| /// | ||
| /// The resulting pointer "remembers" the [allocated object] that `self` points to; it must not | ||
| /// The resulting pointer "remembers"[^1] the [allocated object] that `self` points to; it must not |
There was a problem hiding this comment.
should we just say
| /// The resulting pointer "remembers"[^1] the [allocated object] that `self` points to; it must not | |
| /// The resulting pointer has the provenance of the [allocated object] that `self` points to; it must not |
There was a problem hiding this comment.
idk, does that flow correctly?
There was a problem hiding this comment.
The documentation for provenance actually quotes the current phrasing:
As another example, consider that wrapping_offset is documented to “remember” the allocated object that the original pointer points to, even if it is offset far outside the memory range occupied by that allocated object.
If we change the phrasing of the wrapping_offset docs, this example will become circular and awkward, so I think it's best to leave it as-is.
tgross35
commented
Apr 27, 2025
Cc @RalfJung, your kind of docs :) |
Uh oh!
There was an error while loading. Please reload this page.
RalfJung
commented
Apr 29, 2025
I don't see the suggestion applied? |
rustbot
commented
Apr 29, 2025
Reminder, once the PR becomes ready for a review, use |
lolbinarycat
commented
Apr 29, 2025
Uh oh!
There was an error while loading. Please reload this page.
249fa89 to
851decdCompareRalfJung
commented
Apr 29, 2025
Thanks! @bors r+ rollup |
bors
commented
Apr 29, 2025
…provenance-139008, r=RalfJung mention provenance in the pointer::wrapping_offset docs fixesrust-lang#139008
…enton Rollup of 9 pull requests Successful merges: - rust-lang#139192 (mention provenance in the pointer::wrapping_offset docs) - rust-lang#140176 (Fix linking statics on Arm64EC) - rust-lang#140404 (rm `TypeVistable` impls for `Canonical`) - rust-lang#140437 (enable msa feature for mips in codegen tests) - rust-lang#140438 (Add `rust.debug-assertions-tools` option) - rust-lang#140446 (chore: fix some tests) - rust-lang#140470 (CI: rfl: move job forward to Linux v6.15-rc4) - rust-lang#140476 (chore: delete unused ui/auxiliary crates) - rust-lang#140481 (Require sanitizers be enabled for asan_odr_windows.rs) r? `@ghost` `@rustbot` modify labels: rollup
…provenance-139008, r=RalfJung mention provenance in the pointer::wrapping_offset docs fixesrust-lang#139008
Rollup of 12 pull requests Successful merges: - rust-lang#136160 (Remove backticks from `ShouldPanic::YesWithMessage`'s `TrFailedMsg`) - rust-lang#138087 (Initial implementation of `core_float_math`) - rust-lang#139059 (uses_power_alignment: wording tweaks) - rust-lang#139192 (mention provenance in the pointer::wrapping_offset docs) - rust-lang#140312 (Improve pretty-printing of braces) - rust-lang#140404 (rm `TypeVistable` impls for `Canonical`) - rust-lang#140437 (enable msa feature for mips in codegen tests) - rust-lang#140438 (Add `rust.debug-assertions-tools` option) - rust-lang#140439 (miri: algebraic intrinsics: bring back float non-determinism) - rust-lang#140445 (Treat ManuallyDrop as ~const Destruct) - rust-lang#140446 (chore: fix some tests) - rust-lang#140448 (Rename `rustc_query_append!` to `rustc_with_all_queries!`) Failed merges: - rust-lang#140456 (Fix test simd/extract-insert-dyn on s390x) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 11 pull requests Successful merges: - rust-lang#136160 (Remove backticks from `ShouldPanic::YesWithMessage`'s `TrFailedMsg`) - rust-lang#139059 (uses_power_alignment: wording tweaks) - rust-lang#139192 (mention provenance in the pointer::wrapping_offset docs) - rust-lang#140312 (Improve pretty-printing of braces) - rust-lang#140404 (rm `TypeVistable` impls for `Canonical`) - rust-lang#140437 (enable msa feature for mips in codegen tests) - rust-lang#140438 (Add `rust.debug-assertions-tools` option) - rust-lang#140439 (miri: algebraic intrinsics: bring back float non-determinism) - rust-lang#140445 (Treat ManuallyDrop as ~const Destruct) - rust-lang#140446 (chore: fix some tests) - rust-lang#140448 (Rename `rustc_query_append!` to `rustc_with_all_queries!`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#139192 - lolbinarycat:docs-wrapping_offset-provenance-139008, r=RalfJung mention provenance in the pointer::wrapping_offset docs fixesrust-lang#139008
…provenance-139008, r=RalfJung mention provenance in the pointer::wrapping_offset docs fixesrust-lang#139008
fixes#139008