diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2025-01-09 09:05:08 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-09 09:05:08 +0100 |
| commit | 04e87154bb4133ab553f01506e672ded68c7dd6f (patch) | |
| tree | dd5598b67a3d7fa078c6274fa77d18295705b4ce /compiler/rustc_parse/src | |
| parent | 84910fc3cd762a0cc2616167be844d4b99cc5b31 (diff) | |
| parent | 2d236015410269fa6c9e9a8e921883832a9638e6 (diff) | |
| download | rust-04e87154bb4133ab553f01506e672ded68c7dd6f.tar.gz rust-04e87154bb4133ab553f01506e672ded68c7dd6f.zip | |
Rollup merge of #135242 - RalfJung:nonnull-provenance, r=jhpratt
add missing provenance APIs on NonNull
This adds some provenance APIs that exist on raw pointers but have been forgotten on `NonNull`:
```rust
impl<T> NonNull<T> {
pub const fn without_provenance(addr: NonZero<usize>) -> Self;
pub fn from_exposed_provenance(addr: NonZero<usize>) -> Self;
}
impl<T: ?Sized> NonNull<T> {
pub fn expose_provenance(self) -> NonZero<usize>;
}
```
https://github.com/rust-lang/libs-team/issues/518 is the ACP for the two exposed provenance ones; I forgot to include `without_provenance` there but I hope that, too, is uncontroversial (and anyway this PR only adds things unstably). Cc `@rust-lang/libs-api`
Tracking issue: https://github.com/rust-lang/rust/issues/135243
Diffstat (limited to 'compiler/rustc_parse/src')
0 files changed, 0 insertions, 0 deletions
