Skip to content

Commit a319d32

Browse files
committed
Link Deref{,Mut} to TRPL on coercions.
FIxes #26927
1 parent d6a6178 commit a319d32

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/libcore/ops.rs

+8
Original file line numberDiff line numberDiff line change
@@ -1057,6 +1057,10 @@ impl<Idx: fmt::Debug> fmt::Debug for RangeTo<Idx> {
10571057
/// The `Deref` trait is used to specify the functionality of dereferencing
10581058
/// operations like `*v`.
10591059
///
1060+
/// `Deref` also enables ['`Deref` coercions'][coercions].
1061+
///
1062+
/// [coercions]: ../../book/deref-coercions.html
1063+
///
10601064
/// # Examples
10611065
///
10621066
/// 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 {
11111115
/// The `DerefMut` trait is used to specify the functionality of dereferencing
11121116
/// mutably like `*v = 1;`
11131117
///
1118+
/// `DerefMut` also enables ['`Deref` coercions'][coercions].
1119+
///
1120+
/// [coercions]: ../../book/deref-coercions.html
1121+
///
11141122
/// # Examples
11151123
///
11161124
/// A struct with a single field which is modifiable via dereferencing the

0 commit comments

Comments
 (0)