]> git.lizzy.rs Git - rust.git/commitdiff
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)
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.

1  2 
library/core/src/lib.rs
library/core/src/ptr/const_ptr.rs
library/core/src/ptr/mut_ptr.rs

Simple merge
Simple merge
Simple merge