We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9edb1ab commit 41eb822Copy full SHA for 41eb822
library/core/src/pin.rs
@@ -788,7 +788,7 @@ impl<T: ?Sized> Pin<&'static T> {
788
/// never be moved.
789
#[unstable(feature = "pin_static_ref", issue = "none")]
790
#[rustc_const_unstable(feature = "const_pin", issue = "76654")]
791
- pub const fn new_static(r: &'static T) -> Pin<&'static T> {
+ pub const fn static_ref(r: &'static T) -> Pin<&'static T> {
792
// SAFETY: The 'static lifetime guarantees the data will not be
793
// moved/invalidated until it gets dropped (which is never).
794
unsafe { Pin::new_unchecked(r) }
0 commit comments