File tree Expand file tree Collapse file tree 5 files changed +5
-5
lines changed Expand file tree Collapse file tree 5 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -373,7 +373,7 @@ impl<T: ?Sized> Mutex<T> {
373373 /// or written through after the mutex is dropped.
374374 #[ unstable( feature = "mutex_data_ptr" , issue = "140368" ) ]
375375 // #[unstable(feature = "nonpoison_mutex", issue = "134645")]
376- pub fn data_ptr ( & self ) -> * mut T {
376+ pub const fn data_ptr ( & self ) -> * mut T {
377377 self . data . get ( )
378378 }
379379}
Original file line number Diff line number Diff line change @@ -495,7 +495,7 @@ impl<T: ?Sized> RwLock<T> {
495495 /// or written through after the lock is dropped.
496496 #[ unstable( feature = "rwlock_data_ptr" , issue = "140368" ) ]
497497 // #[unstable(feature = "nonpoison_rwlock", issue = "134645")]
498- pub fn data_ptr ( & self ) -> * mut T {
498+ pub const fn data_ptr ( & self ) -> * mut T {
499499 self . data . get ( )
500500 }
501501}
Original file line number Diff line number Diff line change @@ -668,7 +668,7 @@ impl<T: ?Sized> Mutex<T> {
668668 /// are properly synchronized to avoid data races, and that it is not read
669669 /// or written through after the mutex is dropped.
670670 #[ unstable( feature = "mutex_data_ptr" , issue = "140368" ) ]
671- pub fn data_ptr ( & self ) -> * mut T {
671+ pub const fn data_ptr ( & self ) -> * mut T {
672672 self . data . get ( )
673673 }
674674}
Original file line number Diff line number Diff line change @@ -667,7 +667,7 @@ impl<T: ?Sized> RwLock<T> {
667667 /// are properly synchronized to avoid data races, and that it is not read
668668 /// or written through after the lock is dropped.
669669 #[ unstable( feature = "rwlock_data_ptr" , issue = "140368" ) ]
670- pub fn data_ptr ( & self ) -> * mut T {
670+ pub const fn data_ptr ( & self ) -> * mut T {
671671 self . data . get ( )
672672 }
673673}
Original file line number Diff line number Diff line change @@ -355,7 +355,7 @@ impl<T: ?Sized> ReentrantLock<T> {
355355 /// properly synchronized to avoid data races, and that it is not read
356356 /// through after the lock is dropped.
357357 #[ unstable( feature = "reentrant_lock_data_ptr" , issue = "140368" ) ]
358- pub fn data_ptr ( & self ) -> * const T {
358+ pub const fn data_ptr ( & self ) -> * const T {
359359 & raw const self . data
360360 }
361361
You can’t perform that action at this time.
0 commit comments