@@ -17,34 +17,12 @@ r[lang-types.box.deref]
17
17
* The [ dereference operator] for ` Box<T> ` produces a place which can be moved
18
18
from. This means that the ` * ` operator and the destructor of ` Box<T> ` are
19
19
built-in to the language.
20
-
21
- r[ lang-types.box.receiver]
22
- * [ Methods] can take ` Box<Self> ` as a receiver.
23
-
24
20
r[ lang-types.box.fundamental]
25
21
* A trait may be implemented for ` Box<T> ` in the same crate as ` T ` , which the
26
22
[ orphan rules] prevent for other generic types.
27
23
28
24
<!-- Editor Note: This is nowhere close to an exhaustive list -->
29
25
30
- r[ lang-types.rc]
31
- ## ` Rc<T> `
32
-
33
- r[ lang-types.rc.receiver]
34
- [ Methods] can take [ ` Rc<Self> ` ] as a receiver.
35
-
36
- r[ lang-types.arc]
37
- ## ` Arc<T> `
38
-
39
- r[ lang-types.arc.receiver]
40
- [ Methods] can take [ ` Arc<Self> ` ] as a receiver.
41
-
42
- r[ lang-types.pin]
43
- ## ` Pin<P> `
44
-
45
- r[ lang-types.pin.receiver]
46
- [ Methods] can take [ ` Pin<P> ` ] as a receiver.
47
-
48
26
r[ lang-types.unsafe-cell]
49
27
## ` UnsafeCell<T> `
50
28
@@ -83,6 +61,9 @@ used as a method receiver; that is, the type of a `self` parameter for a
83
61
method. There is a blanket implementation of ` Receiver ` for all ` T: Deref ` ,
84
62
so it's rare to implement ` Receiver ` directly: you'd only normally do this
85
63
for smart pointer types which for some reason can't implement ` Deref ` .
64
+ Built-in types which implement ` Receiver ` (via ` Deref ` ) and are commonly
65
+ used as method receivers include ` Rc<T> ` , ` Arc<T> ` , ` Box<T> ` , and ` Pin<P> `
66
+ where ` P: Deref ` .
86
67
87
68
r[ lang-types.drop]
88
69
## ` Drop `
0 commit comments