Skip to content

Commit 36973e8

Browse files
vmxsteveklabnik
authored andcommitted
---
yaml --- r: 174291 b: refs/heads/snap-stage3 c: f12e60a h: refs/heads/master i: 174289: e29b354 174287: 5b721c0 v: v3
1 parent b7f2ab8 commit 36973e8

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: a833337943300db1c310a4cf9c84b7b4ef4e9468
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 0109ceaf827461d525ada1a71dcba909071d7cdc
4+
refs/heads/snap-stage3: f12e60a5c8bacd8fb43b503000c19187aa3b09c2
55
refs/heads/try: 08f6380a9f0b866796080094f44fe25ea5636547
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/libcore/ops.rs

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)