mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 22:12:15 +00:00
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
This commit is contained in:
commit
df74b70b9e
@ -61,14 +61,14 @@ impl<T: ?Sized> *const T {
|
||||
|
||||
/// Use the pointer value in a new pointer of another type.
|
||||
///
|
||||
/// In case `val` is a (fat) pointer to an unsized type, this operation
|
||||
/// In case `meta` is a (fat) pointer to an unsized type, this operation
|
||||
/// will ignore the pointer part, whereas for (thin) pointers to sized
|
||||
/// types, this has the same effect as a simple cast.
|
||||
///
|
||||
/// The resulting pointer will have provenance of `self`, i.e., for a fat
|
||||
/// pointer, this operation is semantically the same as creating a new
|
||||
/// fat pointer with the data pointer value of `self` but the metadata of
|
||||
/// `val`.
|
||||
/// `meta`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
@ -60,14 +60,14 @@ impl<T: ?Sized> *mut T {
|
||||
|
||||
/// Use the pointer value in a new pointer of another type.
|
||||
///
|
||||
/// In case `val` is a (fat) pointer to an unsized type, this operation
|
||||
/// In case `meta` is a (fat) pointer to an unsized type, this operation
|
||||
/// will ignore the pointer part, whereas for (thin) pointers to sized
|
||||
/// types, this has the same effect as a simple cast.
|
||||
///
|
||||
/// The resulting pointer will have provenance of `self`, i.e., for a fat
|
||||
/// pointer, this operation is semantically the same as creating a new
|
||||
/// fat pointer with the data pointer value of `self` but the metadata of
|
||||
/// `val`.
|
||||
/// `meta`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user