diff options
| author | Son <leson.phung@gmail.com> | 2014-10-14 09:21:39 +0800 |
|---|---|---|
| committer | Son <leson.phung@gmail.com> | 2014-10-14 09:21:39 +0800 |
| commit | d9da3471e8e074f3780e6dffe869852719f46bac (patch) | |
| tree | 6c15af1226675155b6c3d6b337198194aa4f7e78 | |
| parent | 62b48bd8150f22ee6d3275cfa719a808af297414 (diff) | |
| download | rust-d9da3471e8e074f3780e6dffe869852719f46bac.tar.gz rust-d9da3471e8e074f3780e6dffe869852719f46bac.zip | |
Change `from` and `to` to `_from` and `_to`
This to avoid warning: unused variable: `from`, #[warn(unused_variable)] on by default.
| -rw-r--r-- | src/libcore/ops.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs index f58f2cf042e..6de5f31c6d1 100644 --- a/src/libcore/ops.rs +++ b/src/libcore/ops.rs @@ -692,15 +692,15 @@ pub trait IndexMut<Index, Result> { * println!("Slicing!"); * self * } - * fn slice_from_or_fail<'a>(&'a self, from: &Foo) -> &'a Foo { + * fn slice_from_or_fail<'a>(&'a self, _from: &Foo) -> &'a Foo { * println!("Slicing!"); * self * } - * fn slice_to_or_fail<'a>(&'a self, to: &Foo) -> &'a Foo { + * fn slice_to_or_fail<'a>(&'a self, _to: &Foo) -> &'a Foo { * println!("Slicing!"); * self * } - * fn slice_or_fail<'a>(&'a self, from: &Foo, to: &Foo) -> &'a Foo { + * fn slice_or_fail<'a>(&'a self, _from: &Foo, _to: &Foo) -> &'a Foo { * println!("Slicing!"); * self * } @@ -741,15 +741,15 @@ pub trait Slice<Idx, Sized? Result> for Sized? { * println!("Slicing!"); * self * } - * fn slice_from_or_fail_mut<'a>(&'a mut self, from: &Foo) -> &'a mut Foo { + * fn slice_from_or_fail_mut<'a>(&'a mut self, _from: &Foo) -> &'a mut Foo { * println!("Slicing!"); * self * } - * fn slice_to_or_fail_mut<'a>(&'a mut self, to: &Foo) -> &'a mut Foo { + * fn slice_to_or_fail_mut<'a>(&'a mut self, _to: &Foo) -> &'a mut Foo { * println!("Slicing!"); * self * } - * fn slice_or_fail_mut<'a>(&'a mut self, from: &Foo, to: &Foo) -> &'a mut Foo { + * fn slice_or_fail_mut<'a>(&'a mut self, _from: &Foo, _to: &Foo) -> &'a mut Foo { * println!("Slicing!"); * self * } |
