diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-03-10 12:32:02 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-10 12:32:02 +0100 |
| commit | df74b70b9ed90f76afecbcb67d061db28bfa8002 (patch) | |
| tree | eea9c25cc43926630383300103c3f40016899945 | |
| parent | 7918df5f57cf455041620ecbc9e100b6bb84b0d7 (diff) | |
| parent | ccb552e4f5bb11c7b79d1b00002d3cadbb9bc29b (diff) | |
| download | rust-df74b70b9ed90f76afecbcb67d061db28bfa8002.tar.gz rust-df74b70b9ed90f76afecbcb67d061db28bfa8002.zip | |
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
| -rw-r--r-- | library/core/src/ptr/const_ptr.rs | 4 | ||||
| -rw-r--r-- | library/core/src/ptr/mut_ptr.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/library/core/src/ptr/const_ptr.rs b/library/core/src/ptr/const_ptr.rs index 57e2ffe5d20..839afc57f85 100644 --- a/library/core/src/ptr/const_ptr.rs +++ b/library/core/src/ptr/const_ptr.rs @@ -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 /// diff --git a/library/core/src/ptr/mut_ptr.rs b/library/core/src/ptr/mut_ptr.rs index 422d0f2b8f0..ece5244e9a9 100644 --- a/library/core/src/ptr/mut_ptr.rs +++ b/library/core/src/ptr/mut_ptr.rs @@ -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 /// |
