Skip to content

Commit d7d88fc

Browse files
Rollup merge of rust-lang#157521 - pthariensflame:syncview-as-pin, r=BurntSushi
Rename `SyncView::{as_pin => as_pin_ref}` This addresses the resolution of a naming concern from rust-lang#98407. r? BurntSushi
2 parents ab43cae + ce94e80 commit d7d88fc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

library/core/src/sync/sync_view.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ impl<T: ?Sized + Sync> SyncView<T> {
188188
#[rustc_const_unstable(feature = "exclusive_wrapper", issue = "98407")]
189189
#[must_use]
190190
#[inline]
191-
pub const fn as_pin(self: Pin<&Self>) -> Pin<&T> {
191+
pub const fn as_pin_ref(self: Pin<&Self>) -> Pin<&T> {
192192
// SAFETY: `SyncView` can only produce `&T` if itself is unpinned
193193
// `Pin::map_unchecked` is not const, so we do this conversion manually
194194
unsafe { Pin::new_unchecked(&self.get_ref().inner) }

0 commit comments

Comments
 (0)