diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2020-10-12 20:00:44 +0200 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2020-10-12 20:00:44 +0200 |
| commit | 104c0f0194177442ff16cf14907a96d2f8d200dd (patch) | |
| tree | 9d48fb2743dde1348904343c41996e9159b44229 | |
| parent | 390883e888c580d054ab4a2584c851aba50865e9 (diff) | |
Rename Pin::new_static to Pin::static_ref.
| -rw-r--r-- | library/core/src/pin.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/pin.rs b/library/core/src/pin.rs index 3f058124d2b..9e2d64a866f 100644 --- a/library/core/src/pin.rs +++ b/library/core/src/pin.rs @@ -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) } |
