Only promote calls to #[rustc_promotable]
const fns
This commit is contained in:
parent
4cf11765dc
commit
9e46c0b689
42 changed files with 525 additions and 242 deletions
|
@ -209,6 +209,7 @@ pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
|
|||
/// ```
|
||||
#[inline]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[cfg_attr(not(stage0), rustc_promotable)]
|
||||
pub const fn null<T>() -> *const T { 0 as *const T }
|
||||
|
||||
/// Creates a null mutable raw pointer.
|
||||
|
@ -223,6 +224,7 @@ pub const fn null<T>() -> *const T { 0 as *const T }
|
|||
/// ```
|
||||
#[inline]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[cfg_attr(not(stage0), rustc_promotable)]
|
||||
pub const fn null_mut<T>() -> *mut T { 0 as *mut T }
|
||||
|
||||
/// Swaps the values at two mutable locations of the same type, without
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue