@@ -39,13 +39,13 @@ use crate::hash::{Hash, Hasher};
3939///
4040/// # Usage
4141///
42- /// Raw pointers can be decomposed into the data address and metadata components
42+ /// Raw pointers can be decomposed into the data pointer and metadata components
4343/// with their [`to_raw_parts`] method.
4444///
4545/// Alternatively, metadata alone can be extracted with the [`metadata`] function.
4646/// A reference can be passed to [`metadata`] and implicitly coerced.
4747///
48- /// A (possibly-wide) pointer can be put back together from its address and metadata
48+ /// A (possibly-wide) pointer can be put back together from its data pointer and metadata
4949/// with [`from_raw_parts`] or [`from_raw_parts_mut`].
5050///
5151/// [`to_raw_parts`]: *const::to_raw_parts
@@ -98,7 +98,7 @@ pub const fn metadata<T: ?Sized>(ptr: *const T) -> <T as Pointee>::Metadata {
9898 unsafe { PtrRepr { const_ptr: ptr } . components. metadata }
9999}
100100
101- /// Forms a (possibly-wide) raw pointer from a data address and metadata.
101+ /// Forms a (possibly-wide) raw pointer from a data pointer and metadata.
102102///
103103/// This function is safe but the returned pointer is not necessarily safe to dereference.
104104/// For slices, see the documentation of [`slice::from_raw_parts`] for safety requirements.
@@ -109,13 +109,13 @@ pub const fn metadata<T: ?Sized>(ptr: *const T) -> <T as Pointee>::Metadata {
109109#[ rustc_const_unstable( feature = "ptr_metadata" , issue = "81513" ) ]
110110#[ inline]
111111pub const fn from_raw_parts < T : ?Sized > (
112- data_address : * const ( ) ,
112+ data_pointer : * const ( ) ,
113113 metadata : <T as Pointee >:: Metadata ,
114114) -> * const T {
115115 // SAFETY: Accessing the value from the `PtrRepr` union is safe since *const T
116116 // and PtrComponents<T> have the same memory layouts. Only std can make this
117117 // guarantee.
118- unsafe { PtrRepr { components : PtrComponents { data_address , metadata } } . const_ptr }
118+ unsafe { PtrRepr { components : PtrComponents { data_pointer , metadata } } . const_ptr }
119119}
120120
121121/// Performs the same functionality as [`from_raw_parts`], except that a
@@ -126,13 +126,13 @@ pub const fn from_raw_parts<T: ?Sized>(
126126#[ rustc_const_unstable( feature = "ptr_metadata" , issue = "81513" ) ]
127127#[ inline]
128128pub const fn from_raw_parts_mut < T : ?Sized > (
129- data_address : * mut ( ) ,
129+ data_pointer : * mut ( ) ,
130130 metadata : <T as Pointee >:: Metadata ,
131131) -> * mut T {
132132 // SAFETY: Accessing the value from the `PtrRepr` union is safe since *const T
133133 // and PtrComponents<T> have the same memory layouts. Only std can make this
134134 // guarantee.
135- unsafe { PtrRepr { components : PtrComponents { data_address , metadata } } . mut_ptr }
135+ unsafe { PtrRepr { components : PtrComponents { data_pointer , metadata } } . mut_ptr }
136136}
137137
138138#[ repr( C ) ]
@@ -144,7 +144,7 @@ union PtrRepr<T: ?Sized> {
144144
145145#[ repr( C ) ]
146146struct PtrComponents < T : ?Sized > {
147- data_address : * const ( ) ,
147+ data_pointer : * const ( ) ,
148148 metadata : <T as Pointee >:: Metadata ,
149149}
150150
0 commit comments