rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
96.91k stars 12.52k forks source link

Tracking issue for release notes of #130229: ptr::add/sub: fix docs (do not claim equivalence with `offset`) #130472

Open rustbot opened 2 days ago

rustbot commented 2 days ago

This issue tracks the release notes text for #130229.

Steps

Release notes text

The responsible team for the underlying change should edit this section to replace the automatically generated link with a succinct description of what changed, drawing upon text proposed by the author (either in discussion or through direct editing).

# Libraries
- [Change documentation of `ptr::add`/`sub` to not claim equivalence with `offset`](https://github.com/rust-lang/rust/pull/130229).

[!TIP] Use the previous releases categories to help choose which one(s) to use. The category will be de-duplicated with all the other ones by the release team.

More than one section can be included if needed.

Release blog section

If the change is notable enough for inclusion in the blog post, the responsible team should add content to this section. Otherwise leave it empty.

cc @RalfJung, @scottmcm -- origin issue/PR authors and assignees for starting to draft text

RalfJung commented 2 days ago

I am not sure if this needs a "compatibility note" -- it is a breaking change if someone relied on ptr.add(usize::MAX) being equivalent to ptr.sub(1), but that seems quite unlikely (and the actual breaking change that made this UB already happened a while back).