diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2024-12-01 22:10:24 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-01 22:10:24 -0500 |
| commit | 10f3735a023d6f0190a6643adff735e459010c64 (patch) | |
| tree | 261a729f7f471ab8514e85421772f748ee482452 | |
| parent | 8f7a10670f889bc086021d62434b8573a2bb042e (diff) | |
| parent | 69c03262295ab8542aec037ca284cc053ec24047 (diff) | |
| download | rust-10f3735a023d6f0190a6643adff735e459010c64.tar.gz rust-10f3735a023d6f0190a6643adff735e459010c64.zip | |
Rollup merge of #133678 - Urgau:stabilize-ptr_fn_addr_eq, r=jhpratt
Stabilize `ptr::fn_addr_eq` This PR stabilize the `ptr::fn_addr_eq` function. FCP completed in https://github.com/rust-lang/rust/issues/129322#issuecomment-2508304516 Closes https://github.com/rust-lang/rust/issues/129322
| -rw-r--r-- | library/core/src/ptr/mod.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/library/core/src/ptr/mod.rs b/library/core/src/ptr/mod.rs index b6fc0caebd0..bc4c4e168a3 100644 --- a/library/core/src/ptr/mod.rs +++ b/library/core/src/ptr/mod.rs @@ -2111,7 +2111,6 @@ pub fn addr_eq<T: ?Sized, U: ?Sized>(p: *const T, q: *const U) -> bool { /// when compiled with optimization: /// /// ``` -/// # #![feature(ptr_fn_addr_eq)] /// let f: fn(i32) -> i32 = |x| x; /// let g: fn(i32) -> i32 = |x| x + 0; // different closure, different body /// let h: fn(u32) -> u32 = |x| x + 0; // different signature too @@ -2136,7 +2135,6 @@ pub fn addr_eq<T: ?Sized, U: ?Sized>(p: *const T, q: *const U) -> bool { /// # Examples /// /// ``` -/// #![feature(ptr_fn_addr_eq)] /// use std::ptr; /// /// fn a() { println!("a"); } @@ -2145,7 +2143,7 @@ pub fn addr_eq<T: ?Sized, U: ?Sized>(p: *const T, q: *const U) -> bool { /// ``` /// /// [subtype]: https://doc.rust-lang.org/reference/subtyping.html -#[unstable(feature = "ptr_fn_addr_eq", issue = "129322")] +#[stable(feature = "ptr_fn_addr_eq", since = "CURRENT_RUSTC_VERSION")] #[inline(always)] #[must_use = "function pointer comparison produces a value"] pub fn fn_addr_eq<T: FnPtr, U: FnPtr>(f: T, g: U) -> bool { |
