diff options
| author | bors <bors@rust-lang.org> | 2014-07-07 22:46:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-07-07 22:46:41 +0000 |
| commit | 00cdd639a93ec1dcad85cebc52214eeba0441c93 (patch) | |
| tree | ac6caef7db29f171a964f301fa1776c86a012226 /src/libstd | |
| parent | c175ed4425da809d6d28bc509b7dd5301a4a2b33 (diff) | |
| parent | 7e4e99123a68c92f684e5c4466101c1951e86895 (diff) | |
| download | rust-00cdd639a93ec1dcad85cebc52214eeba0441c93.tar.gz rust-00cdd639a93ec1dcad85cebc52214eeba0441c93.zip | |
auto merge of #15394 : pcwalton/rust/new-index-traits, r=nick29581
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<Index,Result> {
fn index<'a>(&'a self, index: &Index) -> &'a Result;
}
pub trait IndexMut<Index,Result> {
fn index_mut<'a>(&'a mut self, index: &Index) -> &'a mut Result;
}
Closes #6515.
[breaking-change]
r? @nick29581
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/prelude.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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}; |
