Skip to content

Commit df74b70

Browse files
authored
Rollup merge of #108964 - majaha:ptr_metadata_doc, r=workingjubilee
Fix the docs for pointer method with_metadata_of The name of the argument to `{*const T, *mut T}::with_metadata_of` was changed from `val` to `meta` recently, but the docs weren't updated to match. Relevant pull request: #103701
2 parents 7918df5 + ccb552e commit df74b70

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

library/core/src/ptr/const_ptr.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ impl<T: ?Sized> *const T {
6161

6262
/// Use the pointer value in a new pointer of another type.
6363
///
64-
/// In case `val` is a (fat) pointer to an unsized type, this operation
64+
/// In case `meta` is a (fat) pointer to an unsized type, this operation
6565
/// will ignore the pointer part, whereas for (thin) pointers to sized
6666
/// types, this has the same effect as a simple cast.
6767
///
6868
/// The resulting pointer will have provenance of `self`, i.e., for a fat
6969
/// pointer, this operation is semantically the same as creating a new
7070
/// fat pointer with the data pointer value of `self` but the metadata of
71-
/// `val`.
71+
/// `meta`.
7272
///
7373
/// # Examples
7474
///

library/core/src/ptr/mut_ptr.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ impl<T: ?Sized> *mut T {
6060

6161
/// Use the pointer value in a new pointer of another type.
6262
///
63-
/// In case `val` is a (fat) pointer to an unsized type, this operation
63+
/// In case `meta` is a (fat) pointer to an unsized type, this operation
6464
/// will ignore the pointer part, whereas for (thin) pointers to sized
6565
/// types, this has the same effect as a simple cast.
6666
///
6767
/// The resulting pointer will have provenance of `self`, i.e., for a fat
6868
/// pointer, this operation is semantically the same as creating a new
6969
/// fat pointer with the data pointer value of `self` but the metadata of
70-
/// `val`.
70+
/// `meta`.
7171
///
7272
/// # Examples
7373
///

0 commit comments

Comments
 (0)