File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -777,8 +777,8 @@ where
777777
778778/// Convert a reference to a raw pointer.
779779///
780- /// This is equivalent to `r as *const T`, but is a bit safer since it will never silently change
781- /// type or mutability, in particular if the code is refactored.
780+ /// For `r: &T`, `from_ref(r)` is equivalent to `r as *const T`, but is a bit safer since it will
781+ /// never silently change type or mutability, in particular if the code is refactored.
782782#[ inline( always) ]
783783#[ must_use]
784784#[ stable( feature = "ptr_from_ref" , since = "1.76.0" ) ]
@@ -791,8 +791,8 @@ pub const fn from_ref<T: ?Sized>(r: &T) -> *const T {
791791
792792/// Convert a mutable reference to a raw pointer.
793793///
794- /// This is equivalent to `r as *mut T`, but is a bit safer since it will never silently change
795- /// type or mutability, in particular if the code is refactored.
794+ /// For `r: &mut T`, `from_mut(r)` is equivalent to `r as *mut T`, but is a bit safer since it will
795+ /// never silently change type or mutability, in particular if the code is refactored.
796796#[ inline( always) ]
797797#[ must_use]
798798#[ stable( feature = "ptr_from_ref" , since = "1.76.0" ) ]
You can’t perform that action at this time.
0 commit comments