Skip to content

Commit a5484ac

Browse files
committed
---
yaml --- r: 56531 b: refs/heads/auto c: 9d33008 h: refs/heads/master i: 56529: 45ab595 56527: 466dd39 v: v3
1 parent ef1e590 commit a5484ac

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
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: ea74f6845e08150e3b38766f57a4af928aea1376
17+
refs/heads/auto: 9d33008da1f533915416be550e25fd52b6a2354b
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/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)