]> git.lizzy.rs Git - rust.git/blobdiff - src/libcore/ptr.rs
Auto merge of #55278 - Centril:constification-1, r=alexcrichton
[rust.git] / src / libcore / ptr.rs
index 827e297c84d1f427918508b885a71395a50884f9..a7bfc3f51244720b5990f3bde99239b695250e38 100644 (file)
@@ -2905,7 +2905,7 @@ pub fn new(ptr: *mut T) -> Option<Self> {
     /// Acquires the underlying `*mut` pointer.
     #[stable(feature = "nonnull", since = "1.25.0")]
     #[inline]
-    pub fn as_ptr(self) -> *mut T {
+    pub const fn as_ptr(self) -> *mut T {
         self.pointer.0 as *mut T
     }