File tree Expand file tree Collapse file tree 2 files changed +6
-13
lines changed Expand file tree Collapse file tree 2 files changed +6
-13
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 9c1dea5eb247c505ff050b6cf0aa13d260b872e5
2
+ refs/heads/master: 135a8afd7b2e969bac352baa5fef377c5c90476f
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
5
5
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
Original file line number Diff line number Diff line change @@ -1350,20 +1350,13 @@ implemented. Implementation names do not conflict the way other names
1350
1350
do: multiple implementations with the same name may exist in a scope at
1351
1351
the same time.
1352
1352
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
1355
1355
statically (as direct calls on the values of the type that the
1356
1356
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.
1367
1360
1368
1361
_ When_ a trait is specified, all methods declared as part of the
1369
1362
trait must be present, with matching types and type parameter
You can’t perform that action at this time.
0 commit comments