Skip to content

Commit d193bf3

Browse files
author
Jorge Aparicio
committed
libcore: fix doctests
1 parent bc23b8e commit d193bf3

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

src/libcore/ops.rs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232
//! }
3333
//!
3434
//! impl Add<Point, Point> for Point {
35-
//! fn add(&self, other: &Point) -> Point {
35+
//! fn add(self, other: Point) -> Point {
3636
//! Point {x: self.x + other.x, y: self.y + other.y}
3737
//! }
3838
//! }
3939
//!
4040
//! impl Sub<Point, Point> for Point {
41-
//! fn sub(&self, other: &Point) -> Point {
41+
//! fn sub(self, other: Point) -> Point {
4242
//! Point {x: self.x - other.x, y: self.y - other.y}
4343
//! }
4444
//! }
@@ -133,9 +133,9 @@ macro_rules! add_impl(
133133
/// struct Foo;
134134
///
135135
/// impl Add<Foo, Foo> for Foo {
136-
/// fn add(&self, _rhs: &Foo) -> Foo {
136+
/// fn add(self, _rhs: Foo) -> Foo {
137137
/// println!("Adding!");
138-
/// *self
138+
/// self
139139
/// }
140140
/// }
141141
///
@@ -215,9 +215,9 @@ macro_rules! sub_impl(
215215
/// struct Foo;
216216
///
217217
/// impl Sub<Foo, Foo> for Foo {
218-
/// fn sub(&self, _rhs: &Foo) -> Foo {
218+
/// fn sub(self, _rhs: Foo) -> Foo {
219219
/// println!("Subtracting!");
220-
/// *self
220+
/// self
221221
/// }
222222
/// }
223223
///
@@ -297,9 +297,9 @@ macro_rules! mul_impl(
297297
/// struct Foo;
298298
///
299299
/// impl Mul<Foo, Foo> for Foo {
300-
/// fn mul(&self, _rhs: &Foo) -> Foo {
300+
/// fn mul(self, _rhs: Foo) -> Foo {
301301
/// println!("Multiplying!");
302-
/// *self
302+
/// self
303303
/// }
304304
/// }
305305
///
@@ -379,9 +379,9 @@ macro_rules! div_impl(
379379
/// struct Foo;
380380
///
381381
/// impl Div<Foo, Foo> for Foo {
382-
/// fn div(&self, _rhs: &Foo) -> Foo {
382+
/// fn div(self, _rhs: Foo) -> Foo {
383383
/// println!("Dividing!");
384-
/// *self
384+
/// self
385385
/// }
386386
/// }
387387
///
@@ -475,9 +475,9 @@ macro_rules! rem_float_impl(
475475
/// struct Foo;
476476
///
477477
/// impl Rem<Foo, Foo> for Foo {
478-
/// fn rem(&self, _rhs: &Foo) -> Foo {
478+
/// fn rem(self, _rhs: Foo) -> Foo {
479479
/// println!("Remainder-ing!");
480-
/// *self
480+
/// self
481481
/// }
482482
/// }
483483
///
@@ -669,9 +669,9 @@ macro_rules! bitand_impl(
669669
/// struct Foo;
670670
///
671671
/// impl BitAnd<Foo, Foo> for Foo {
672-
/// fn bitand(&self, _rhs: &Foo) -> Foo {
672+
/// fn bitand(self, _rhs: Foo) -> Foo {
673673
/// println!("Bitwise And-ing!");
674-
/// *self
674+
/// self
675675
/// }
676676
/// }
677677
///
@@ -751,9 +751,9 @@ macro_rules! bitor_impl(
751751
/// struct Foo;
752752
///
753753
/// impl BitOr<Foo, Foo> for Foo {
754-
/// fn bitor(&self, _rhs: &Foo) -> Foo {
754+
/// fn bitor(self, _rhs: Foo) -> Foo {
755755
/// println!("Bitwise Or-ing!");
756-
/// *self
756+
/// self
757757
/// }
758758
/// }
759759
///
@@ -833,9 +833,9 @@ macro_rules! bitxor_impl(
833833
/// struct Foo;
834834
///
835835
/// impl BitXor<Foo, Foo> for Foo {
836-
/// fn bitxor(&self, _rhs: &Foo) -> Foo {
836+
/// fn bitxor(self, _rhs: Foo) -> Foo {
837837
/// println!("Bitwise Xor-ing!");
838-
/// *self
838+
/// self
839839
/// }
840840
/// }
841841
///
@@ -917,9 +917,9 @@ macro_rules! shl_impl(
917917
/// struct Foo;
918918
///
919919
/// impl Shl<Foo, Foo> for Foo {
920-
/// fn shl(&self, _rhs: &Foo) -> Foo {
920+
/// fn shl(self, _rhs: Foo) -> Foo {
921921
/// println!("Shifting left!");
922-
/// *self
922+
/// self
923923
/// }
924924
/// }
925925
///
@@ -1001,9 +1001,9 @@ macro_rules! shr_impl(
10011001
/// struct Foo;
10021002
///
10031003
/// impl Shr<Foo, Foo> for Foo {
1004-
/// fn shr(&self, _rhs: &Foo) -> Foo {
1004+
/// fn shr(self, _rhs: Foo) -> Foo {
10051005
/// println!("Shifting right!");
1006-
/// *self
1006+
/// self
10071007
/// }
10081008
/// }
10091009
///

0 commit comments

Comments
 (0)