]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #103701 - WaffleLapkin:__points-at-implementation__--this-can-be...
authorManish Goregaokar <manishsmail@gmail.com>
Fri, 18 Nov 2022 22:48:17 +0000 (17:48 -0500)
committerGitHub <noreply@github.com>
Fri, 18 Nov 2022 22:48:17 +0000 (17:48 -0500)
commit19efa2599c1d661816c17fcb8e52776748ddc72a
tree9ae1325353d70259fdf15d524995b883ca531364
parente2301154e3c39f4bf606b6137d9cf5bf29a5f52e
parentd3b51926f81cd15740d5a06172a2697bee1d6dfc
Rollup merge of #103701 - WaffleLapkin:__points-at-implementation__--this-can-be-simplified, r=scottmcm

Simplify some pointer method implementations

- Make `pointer::with_metadata_of` const (+simplify implementation) (cc #75091)
- Simplify implementation of various pointer methods

r? ```@scottmcm```

----

`from_raw_parts::<T>(this, metadata(self))` was annoying me for a while and I've finally figured out how it should _actually_ be done.
library/core/src/lib.rs
library/core/src/ptr/const_ptr.rs
library/core/src/ptr/mut_ptr.rs