]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #103702 - WaffleLapkin:lift-sized-bounds-from-pointer-methods-where...
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>
Wed, 18 Jan 2023 10:25:36 +0000 (15:55 +0530)
committerGitHub <noreply@github.com>
Wed, 18 Jan 2023 10:25:36 +0000 (15:55 +0530)
commitd6ea99d2ed70334b8403bcdfe767713b1edd0e80
tree2464598d1455d853868018659f5326d49da515bf
parent74c1ad5d35c7fbdb834c42144d966279fdff3679
parent662f1f20e4497cdd1459d15686706fe27d56d335
Rollup merge of #103702 - WaffleLapkin:lift-sized-bounds-from-pointer-methods-where-applicable, r=m-ou-se

Lift `T: Sized` bounds from some `strict_provenance` pointer methods

This PR removes requirement for `T` (pointee type) to be `Sized` to call `pointer::{addr, expose_addr, with_addr, map_addr}`. These functions don't use `T`'s size, so there is no reason for them to require this. Updated public API:

cc ``@Gankra,`` #95228
r? libs-api
library/core/src/ptr/const_ptr.rs
library/core/src/ptr/mut_ptr.rs
library/core/src/ptr/non_null.rs