@@ -44,7 +44,7 @@ operator:
44
44
45
45
``` rust
46
46
trait AddAssign <Rhs = Self > {
47
- fn add_assign (& mut self , Rhs );
47
+ fn add_assign (& mut self , rhs : Rhs );
48
48
}
49
49
```
50
50
@@ -138,7 +138,7 @@ they are always overloaded together:
138
138
trait Add <Rhs = Self > {
139
139
type Output ;
140
140
fn add (self , rhs : Rhs ) -> Self :: Output ;
141
- fn add_assign (& mut self , Rhs );
141
+ fn add_assign (& mut self , rhs : Rhs );
142
142
}
143
143
```
144
144
@@ -153,7 +153,7 @@ full trait implementation:
153
153
// the `default` qualifier here means (1) not all items are implied
154
154
// and (2) those that are can be further specialized
155
155
default impl <T : Clone , Rhs > Add <Rhs > for T {
156
- fn add_assign (& mut self , rhs : R ) {
156
+ fn add_assign (& mut self , rhs : Rhs ) {
157
157
let tmp = self . clone () + rhs ;
158
158
* self = tmp ;
159
159
}
@@ -1350,11 +1350,11 @@ using the `default` keyword at the `impl` level:
1350
1350
trait Add <Rhs = Self > {
1351
1351
type Output ;
1352
1352
fn add (self , rhs : Rhs ) -> Self :: Output ;
1353
- fn add_assign (& mut self , Rhs );
1353
+ fn add_assign (& mut self , rhs : Rhs );
1354
1354
}
1355
1355
1356
1356
default impl <T : Clone , Rhs > Add <Rhs > for T {
1357
- fn add_assign (& mut self , rhs : R ) {
1357
+ fn add_assign (& mut self , rhs : Rhs ) {
1358
1358
let tmp = self . clone () + rhs ;
1359
1359
* self = tmp ;
1360
1360
}
0 commit comments