File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 3dc52da989dfa69a6d1abf908610e52c472f871f
2
+ refs/heads/master: 1615afe7046d7fe9ba3f390a462aecdd96d374cb
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 @@ -2518,19 +2518,17 @@ interface describes types that support an equality operation:
2518
2518
2519
2519
~~~~
2520
2520
iface eq {
2521
- fn equals(other: self) -> bool;
2521
+ fn equals(&& other: self) -> bool;
2522
2522
}
2523
- ~~~~
2524
-
2525
- In an implementation for type ` int ` , the ` equals ` method takes an
2526
- ` int ` argument:
2527
2523
2528
- ~~~~
2529
2524
impl of eq for int {
2530
- fn equals(other: int) { other == self }
2525
+ fn equals(&& other: int) -> bool { other == self }
2531
2526
}
2532
2527
~~~~
2533
2528
2529
+ Notice that ` equals ` takes an ` int ` argument, rather than a ` self ` argument, in
2530
+ an implementation for type ` int ` .
2531
+
2534
2532
## Casting to an interface type
2535
2533
2536
2534
The above allows us to define functions that polymorphically act on
You can’t perform that action at this time.
0 commit comments