Skip to content

Commit 66616c6

Browse files
committed
---
yaml --- r: 57283 b: refs/heads/try c: 9d33008 h: refs/heads/master i: 57281: a9b0c28 57279: 828689b v: v3
1 parent 5ab5a95 commit 66616c6

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: c081ffbd1e845687202a975ea2e698b623e5722f
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 79a2b2eafc3c766cecec8a5f76317693bae9ed17
5-
refs/heads/try: ea74f6845e08150e3b38766f57a4af928aea1376
5+
refs/heads/try: 9d33008da1f533915416be550e25fd52b6a2354b
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/doc/tutorial.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2056,11 +2056,10 @@ method declarations. So, re-declaring the type parameter
20562056
`T` as an explicit type parameter for `len`, in either the trait or
20572057
the impl, would be a compile-time error.
20582058

2059-
Within a trait definition, `self` is a special type that you can think
2059+
Within a trait definition, `Self` is a special type that you can think
20602060
of as a type parameter. An implementation of the trait for any given
2061-
type `T` replaces the `self` type parameter with `T`. Simply, in a
2062-
trait, `self` is a type, and in an impl, `self` is a value. The
2063-
following trait describes types that support an equality operation:
2061+
type `T` replaces the `Self` type parameter with `T`. The following
2062+
trait describes types that support an equality operation:
20642063

20652064
~~~~
20662065
// In a trait, `self` refers to the self argument.
@@ -2076,7 +2075,7 @@ impl Eq for int {
20762075
~~~~
20772076

20782077
Notice that in the trait definition, `equals` takes a
2079-
second parameter of type `self`.
2078+
second parameter of type `Self`.
20802079
In contrast, in the `impl`, `equals` takes a second parameter of
20812080
type `int`, only using `self` as the name of the receiver.
20822081

0 commit comments

Comments
 (0)