Change _rhs to _index.

Because var is provided as an index not a right hand side.
This commit is contained in:
Son 2014-10-14 09:11:37 +08:00
parent c7e0724274
commit 8f717ffe60
1 changed files with 2 additions and 3 deletions

View File

@ -626,7 +626,7 @@ shr_impl!(uint u8 u16 u32 u64 int i8 i16 i32 i64)
* struct Foo;
*
* impl Index<Foo, Foo> for Foo {
* fn index<'a>(&'a self, _rhs: &Foo) -> &'a Foo {
* fn index<'a>(&'a self, _index: &Foo) -> &'a Foo {
* println!("Indexing!");
* self
* }
@ -657,7 +657,7 @@ pub trait Index<Index, Result> {
* struct Foo;
*
* impl IndexMut<Foo, Foo> for Foo {
* fn index_mut<'a>(&'a mut self, _rhs: &Foo) -> &'a mut Foo {
* fn index_mut<'a>(&'a mut self, _index: &Foo) -> &'a mut Foo {
* println!("Indexing!");
* self
* }
@ -901,4 +901,3 @@ def_fn_mut!(A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12)
def_fn_mut!(A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13)
def_fn_mut!(A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14)
def_fn_mut!(A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15)