Stabilize `#![feature(non_null_from_ref)]` by mathisbot · Pull Request #140511 · rust-lang/rust

@rustbot rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-libs

Relevant to the library team, which will review and decide on the PR/issue.

labels

Apr 30, 2025

@rustbot rustbot added the T-libs-api

Relevant to the library API team, which will review and decide on the PR/issue.

label

Apr 30, 2025

@rustbot rustbot removed the T-libs

Relevant to the library team, which will review and decide on the PR/issue.

label

Apr 30, 2025

@mathisbot

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

May 18, 2025

bors added a commit to rust-lang-ci/rust that referenced this pull request

May 18, 2025
Rollup of 8 pull requests

Successful merges:

 - rust-lang#140113 (Add per page TOC in the `rustc` book)
 - rust-lang#140511 (Stabilize `#![feature(non_null_from_ref)]`)
 - rust-lang#140924 (Make some `f32`/`f64` tests also run in const-context)
 - rust-lang#140966 (Remove #![feature(let_chains)] from library and src/librustdoc)
 - rust-lang#141045 ([win][arm64] Remove 'Arm64 Hazard' undocumented MSVC option and instead disable problematic test)
 - rust-lang#141071 (Enable [behind-upstream] triagebot option for rust-lang/rust)
 - rust-lang#141132 (Use `crate::` prefix for root macro suggestions)
 - rust-lang#141139 (Fix Rust for Linux ping group label)

r? `@ghost`
`@rustbot` modify labels: rollup

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

May 18, 2025
Rollup merge of rust-lang#140511 - mathisbot:master, r=dtolnay

Stabilize `#![feature(non_null_from_ref)]`

This PR stabilizes the following:
```rust
impl<T: ?Sized> NonNull<T> {
    pub const fn from_ref(reference: &T) -> NonNull<T>;
    pub const fn from_mut(reference: &mut T) -> NonNull<T>;
}
```
The feature is tracked in [rust-lang#130823](rust-lang#130823).

github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request

May 21, 2025
Stabilize `#![feature(non_null_from_ref)]`

This PR stabilizes the following:
```rust
impl<T: ?Sized> NonNull<T> {
    pub const fn from_ref(reference: &T) -> NonNull<T>;
    pub const fn from_mut(reference: &mut T) -> NonNull<T>;
}
```
The feature is tracked in [rust-lang#130823](rust-lang#130823).