From 7e4e99123a68c92f684e5c4466101c1951e86895 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Thu, 3 Jul 2014 14:32:41 -0700 Subject: librustc (RFC #34): Implement the new `Index` and `IndexMut` traits. This will break code that used the old `Index` trait. Change this code to use the new `Index` traits. For reference, here are their signatures: pub trait Index { fn index<'a>(&'a self, index: &Index) -> &'a Result; } pub trait IndexMut { fn index_mut<'a>(&'a mut self, index: &Index) -> &'a mut Result; } Closes #6515. [breaking-change] --- src/libstd/prelude.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/libstd') diff --git a/src/libstd/prelude.rs b/src/libstd/prelude.rs index 61e8b63af35..28cd7223b0a 100644 --- a/src/libstd/prelude.rs +++ b/src/libstd/prelude.rs @@ -44,7 +44,8 @@ #[doc(no_inline)] pub use ops::{Add, Sub, Mul, Div, Rem, Neg, Not}; #[doc(no_inline)] pub use ops::{BitAnd, BitOr, BitXor}; #[doc(no_inline)] pub use ops::{Drop, Deref, DerefMut}; -#[doc(no_inline)] pub use ops::{Shl, Shr, Index}; +#[doc(no_inline)] pub use ops::{Shl, Shr}; +#[doc(no_inline)] #[cfg(not(stage0))] pub use ops::{Index, IndexMut}; #[doc(no_inline)] pub use option::{Option, Some, None}; #[doc(no_inline)] pub use result::{Result, Ok, Err}; -- cgit 1.4.1-3-g733a5