diff options
| author | JOE1994 <joseph942010@gmail.com> | 2020-05-31 15:58:06 -0400 |
|---|---|---|
| committer | JOE1994 <joseph942010@gmail.com> | 2020-05-31 15:58:06 -0400 |
| commit | 3048a41a5a042c2633a4d87ea38e04a1407f5bd3 (patch) | |
| tree | e09328265e9a3ca54497d476798779c009f7ef5d /src/libcore/ops | |
| parent | f6072cab136beea206b7cfe79f8d10fccf5af591 (diff) | |
| download | rust-3048a41a5a042c2633a4d87ea38e04a1407f5bd3.tar.gz rust-3048a41a5a042c2633a4d87ea38e04a1407f5bd3.zip | |
Rephrase term 'non-pointer type'
If the reader assumes that 'pointer type's include 'smart pointer's, the term 'non-pointer type' could mislead the reader to assume that x should not be a smart pointer type. I tried to rephrase the term 'non-pointer type' to remove ambiguity in the doc comments. closes #72335 Thank you for reviewing this PR! :)
Diffstat (limited to 'src/libcore/ops')
| -rw-r--r-- | src/libcore/ops/deref.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/ops/deref.rs b/src/libcore/ops/deref.rs index 6e96aa330ff..3faeb170b06 100644 --- a/src/libcore/ops/deref.rs +++ b/src/libcore/ops/deref.rs @@ -18,8 +18,8 @@ /// /// If `T` implements `Deref<Target = U>`, and `x` is a value of type `T`, then: /// -/// * In immutable contexts, `*x` on non-pointer types is equivalent to -/// `*Deref::deref(&x)`. +/// * In immutable contexts, `*x` (where `T` is neither a reference nor a raw pointer) +/// is equivalent to `*Deref::deref(&x)`. /// * Values of type `&T` are coerced to values of type `&U` /// * `T` implicitly implements all the (immutable) methods of the type `U`. /// @@ -115,8 +115,8 @@ impl<T: ?Sized> Deref for &mut T { /// If `T` implements `DerefMut<Target = U>`, and `x` is a value of type `T`, /// then: /// -/// * In mutable contexts, `*x` on non-pointer types is equivalent to -/// `*DerefMut::deref_mut(&mut x)`. +/// * In mutable contexts, `*x` (where `T` is neither a reference nor a raw pointer) +/// is equivalent to `*DerefMut::deref_mut(&mut x)`. /// * Values of type `&mut T` are coerced to values of type `&mut U` /// * `T` implicitly implements all the (mutable) methods of the type `U`. /// |
