Skip to content

Commit ecc1735

Browse files
committed
---
yaml --- r: 22607 b: refs/heads/master c: 135a8af h: refs/heads/master i: 22605: c6ea222 22603: 6e46ced 22599: e002ac4 22591: 0c4285a v: v3
1 parent 3050281 commit ecc1735

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 9c1dea5eb247c505ff050b6cf0aa13d260b872e5
2+
refs/heads/master: 135a8afd7b2e969bac352baa5fef377c5c90476f
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/doc/rust.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1350,20 +1350,13 @@ implemented. Implementation names do not conflict the way other names
13501350
do: multiple implementations with the same name may exist in a scope at
13511351
the same time.
13521352

1353-
It is possible to define an implementation without referring to a trait.
1354-
The methods in such an implementation can only be used
1353+
It is possible to define an implementation without referring to a
1354+
trait. The methods in such an implementation can only be used
13551355
statically (as direct calls on the values of the type that the
13561356
implementation targets). In such an implementation, the `of` clause is
1357-
not given, and the name is mandatory.
1358-
1359-
~~~~
1360-
impl uint_loops for uint {
1361-
fn times(f: fn(uint)) {
1362-
let mut i = 0u;
1363-
while i < self { f(i); i += 1u; }
1364-
}
1365-
}
1366-
~~~~
1357+
not given, and the name is mandatory. Such implementations are
1358+
limited to nominal types (enums, classes) and the implementation must
1359+
appear in the same module or a sub-module as the receiver type.
13671360

13681361
_When_ a trait is specified, all methods declared as part of the
13691362
trait must be present, with matching types and type parameter

0 commit comments

Comments
 (0)