@@ -830,28 +830,27 @@ shr_impl_all! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize }
830830///
831831/// # Example
832832///
833- /// A trivial implementation of `Index`. When `Foo[Foo ]` happens, it ends up
833+ /// A trivial implementation of `Index`. When `Foo[Bar ]` happens, it ends up
834834/// calling `index`, and therefore, `main` prints `Indexing!`.
835835///
836836/// ```
837- /// #![feature(associated_types)]
838- ///
839837/// use std::ops::Index;
840838///
841839/// #[derive(Copy)]
842840/// struct Foo;
841+ /// struct Bar;
843842///
844- /// impl Index<Foo > for Foo {
843+ /// impl Index<Bar > for Foo {
845844/// type Output = Foo;
846845///
847- /// fn index<'a>(&'a self, _index: &Foo ) -> &'a Foo {
846+ /// fn index<'a>(&'a self, _index: &Bar ) -> &'a Foo {
848847/// println!("Indexing!");
849848/// self
850849/// }
851850/// }
852851///
853852/// fn main() {
854- /// Foo[Foo ];
853+ /// Foo[Bar ];
855854/// }
856855/// ```
857856#[ lang="index" ]
@@ -867,28 +866,27 @@ pub trait Index<Index: ?Sized> {
867866///
868867/// # Example
869868///
870- /// A trivial implementation of `IndexMut`. When `Foo[Foo ]` happens, it ends up
869+ /// A trivial implementation of `IndexMut`. When `Foo[Bar ]` happens, it ends up
871870/// calling `index_mut`, and therefore, `main` prints `Indexing!`.
872871///
873872/// ```
874- /// #![feature(associated_types)]
875- ///
876873/// use std::ops::IndexMut;
877874///
878875/// #[derive(Copy)]
879876/// struct Foo;
877+ /// struct Bar;
880878///
881- /// impl IndexMut<Foo > for Foo {
879+ /// impl IndexMut<Bar > for Foo {
882880/// type Output = Foo;
883881///
884- /// fn index_mut<'a>(&'a mut self, _index: &Foo ) -> &'a mut Foo {
882+ /// fn index_mut<'a>(&'a mut self, _index: &Bar ) -> &'a mut Foo {
885883/// println!("Indexing!");
886884/// self
887885/// }
888886/// }
889887///
890888/// fn main() {
891- /// &mut Foo[Foo ];
889+ /// &mut Foo[Bar ];
892890/// }
893891/// ```
894892#[ lang="index_mut" ]
0 commit comments