Rename Pin::new_static to Pin::static_ref.
This commit is contained in:
parent
390883e888
commit
104c0f0194
1 changed files with 1 additions and 1 deletions
|
|
@ -788,7 +788,7 @@ impl<T: ?Sized> Pin<&'static T> {
|
|||
/// never be moved.
|
||||
#[unstable(feature = "pin_static_ref", issue = "none")]
|
||||
#[rustc_const_unstable(feature = "const_pin", issue = "76654")]
|
||||
pub const fn new_static(r: &'static T) -> Pin<&'static T> {
|
||||
pub const fn static_ref(r: &'static T) -> Pin<&'static T> {
|
||||
// SAFETY: The 'static lifetime guarantees the data will not be
|
||||
// moved/invalidated until it gets dropped (which is never).
|
||||
unsafe { Pin::new_unchecked(r) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue