Skip to content

Commit 2c0b678

Browse files
committed
---
yaml --- r: 39931 b: refs/heads/dist-snap c: d81196c h: refs/heads/master i: 39929: 0c0ae75 39927: 4f42481 v: v3
1 parent f403015 commit 2c0b678

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
99
refs/heads/incoming: e90142e536c150df0d9b4b2f11352152177509b5
10-
refs/heads/dist-snap: 9cba4af24366b6c08299e709fac26361d7920ccb
10+
refs/heads/dist-snap: d81196ce96b1d3da7bb718ed4c5e9d4810be896e
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/doc/rust.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,9 +1157,14 @@ The definition expression of a constant is limited to expression forms that can
11571157

11581158
### Traits
11591159

1160-
A _trait item_ describes a set of method types. [_implementation
1161-
items_](#implementations) can be used to provide implementations of
1162-
those methods for a specific type.
1160+
A _trait_ describes a set of method types.
1161+
1162+
Traits can include default implementations of methods,
1163+
written in terms of some unknown [`self` type](#self-types);
1164+
the `self` type may either be completely unspecified,
1165+
or constrained by some other [trait type](#trait-types).
1166+
1167+
Traits are implemented for specific types through separate [implementations](#implementations).
11631168

11641169
~~~~
11651170
# type surface = int;
@@ -1171,10 +1176,9 @@ trait shape {
11711176
}
11721177
~~~~
11731178

1174-
This defines a trait with two methods. All values that have
1175-
[implementations](#implementations) of this trait in scope can
1176-
have their `draw` and `bounding_box` methods called, using
1177-
`value.bounding_box()` [syntax](#field-expressions).
1179+
This defines a trait with two methods.
1180+
All values that have [implementations](#implementations) of this trait in scope can have their `draw` and `bounding_box` methods called,
1181+
using `value.bounding_box()` [syntax](#field-expressions).
11781182

11791183
Type parameters can be specified for a trait to make it generic.
11801184
These appear after the name, using the same syntax used in [generic

0 commit comments

Comments
 (0)