update version placeholders
This commit is contained in:
parent
ef1b78eabe
commit
c00486c9bb
10 changed files with 19 additions and 19 deletions
|
|
@ -729,7 +729,7 @@ pub const fn type_name<T: ?Sized>() -> &'static str {
|
|||
/// assert!(type_name_of_val(&y).contains("f32"));
|
||||
/// ```
|
||||
#[must_use]
|
||||
#[stable(feature = "type_name_of_val", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "type_name_of_val", since = "1.76.0")]
|
||||
#[rustc_const_unstable(feature = "const_type_name", issue = "63084")]
|
||||
pub const fn type_name_of_val<T: ?Sized>(_val: &T) -> &'static str {
|
||||
type_name::<T>()
|
||||
|
|
|
|||
|
|
@ -1088,7 +1088,7 @@ impl<T> Option<T> {
|
|||
/// let x: Option<&usize> = v.get(5).inspect(|x| println!("got: {x}"));
|
||||
/// ```
|
||||
#[inline]
|
||||
#[stable(feature = "result_option_inspect", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "result_option_inspect", since = "1.76.0")]
|
||||
pub fn inspect<F: FnOnce(&T)>(self, f: F) -> Self {
|
||||
if let Some(ref x) = self {
|
||||
f(x);
|
||||
|
|
|
|||
|
|
@ -720,8 +720,8 @@ where
|
|||
/// type or mutability, in particular if the code is refactored.
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
#[stable(feature = "ptr_from_ref", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "ptr_from_ref", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "ptr_from_ref", since = "1.76.0")]
|
||||
#[rustc_const_stable(feature = "ptr_from_ref", since = "1.76.0")]
|
||||
#[rustc_never_returns_null_ptr]
|
||||
#[rustc_diagnostic_item = "ptr_from_ref"]
|
||||
pub const fn from_ref<T: ?Sized>(r: &T) -> *const T {
|
||||
|
|
@ -734,8 +734,8 @@ pub const fn from_ref<T: ?Sized>(r: &T) -> *const T {
|
|||
/// type or mutability, in particular if the code is refactored.
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
#[stable(feature = "ptr_from_ref", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "ptr_from_ref", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "ptr_from_ref", since = "1.76.0")]
|
||||
#[rustc_const_stable(feature = "ptr_from_ref", since = "1.76.0")]
|
||||
#[rustc_allow_const_fn_unstable(const_mut_refs)]
|
||||
#[rustc_never_returns_null_ptr]
|
||||
pub const fn from_mut<T: ?Sized>(r: &mut T) -> *mut T {
|
||||
|
|
@ -1922,7 +1922,7 @@ pub fn eq<T: ?Sized>(a: *const T, b: *const T) -> bool {
|
|||
/// assert!(ptr::addr_eq(whole, first));
|
||||
/// assert!(!ptr::eq::<dyn std::fmt::Debug>(whole, first));
|
||||
/// ```
|
||||
#[stable(feature = "ptr_addr_eq", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "ptr_addr_eq", since = "1.76.0")]
|
||||
#[inline(always)]
|
||||
#[must_use = "pointer comparison produces a value"]
|
||||
pub fn addr_eq<T: ?Sized, U: ?Sized>(p: *const T, q: *const U) -> bool {
|
||||
|
|
|
|||
|
|
@ -842,7 +842,7 @@ impl<T, E> Result<T, E> {
|
|||
/// .expect("failed to parse number");
|
||||
/// ```
|
||||
#[inline]
|
||||
#[stable(feature = "result_option_inspect", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "result_option_inspect", since = "1.76.0")]
|
||||
pub fn inspect<F: FnOnce(&T)>(self, f: F) -> Self {
|
||||
if let Ok(ref t) = self {
|
||||
f(t);
|
||||
|
|
@ -864,7 +864,7 @@ impl<T, E> Result<T, E> {
|
|||
/// }
|
||||
/// ```
|
||||
#[inline]
|
||||
#[stable(feature = "result_option_inspect", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "result_option_inspect", since = "1.76.0")]
|
||||
pub fn inspect_err<F: FnOnce(&E)>(self, f: F) -> Self {
|
||||
if let Err(ref e) = self {
|
||||
f(e);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue