Skip to content

Commit 41eb822

Browse files
m-ou-seMark-Simulacrum
authored andcommitted
Rename Pin::new_static to Pin::static_ref.
1 parent 9edb1ab commit 41eb822

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/pin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ impl<T: ?Sized> Pin<&'static T> {
788788
/// never be moved.
789789
#[unstable(feature = "pin_static_ref", issue = "none")]
790790
#[rustc_const_unstable(feature = "const_pin", issue = "76654")]
791-
pub const fn new_static(r: &'static T) -> Pin<&'static T> {
791+
pub const fn static_ref(r: &'static T) -> Pin<&'static T> {
792792
// SAFETY: The 'static lifetime guarantees the data will not be
793793
// moved/invalidated until it gets dropped (which is never).
794794
unsafe { Pin::new_unchecked(r) }

0 commit comments

Comments
 (0)