From a319d32a57a7ad758e2719b096fdfa6fe53664b0 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Thu, 23 Jul 2015 12:57:22 -0400 Subject: [PATCH] Link Deref{,Mut} to TRPL on coercions. FIxes #26927 --- src/libcore/ops.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs index c2a9b8c8308cd..0f9282a1455a5 100644 --- a/src/libcore/ops.rs +++ b/src/libcore/ops.rs @@ -1057,6 +1057,10 @@ impl fmt::Debug for RangeTo { /// The `Deref` trait is used to specify the functionality of dereferencing /// operations like `*v`. /// +/// `Deref` also enables ['`Deref` coercions'][coercions]. +/// +/// [coercions]: ../../book/deref-coercions.html +/// /// # Examples /// /// A struct with a single field which is accessible via dereferencing the @@ -1111,6 +1115,10 @@ impl<'a, T: ?Sized> Deref for &'a mut T { /// The `DerefMut` trait is used to specify the functionality of dereferencing /// mutably like `*v = 1;` /// +/// `DerefMut` also enables ['`Deref` coercions'][coercions]. +/// +/// [coercions]: ../../book/deref-coercions.html +/// /// # Examples /// /// A struct with a single field which is modifiable via dereferencing the