shr_impl! { uint u8 u16 u32 u64 int i8 i16 i32 i64 }
-// NOTE(stage0) remove trait after a snapshot
-#[cfg(stage0)]
-#[allow(missing_docs)]
-#[lang="index"]
-pub trait Index<Sized? Index, Sized? Result> for Sized? {
- /// The method for the indexing (`Foo[Bar]`) operation
- fn index<'a>(&'a self, index: &Index) -> &'a Result;
-}
-
/// The `Index` trait is used to specify the functionality of indexing operations
/// like `arr[idx]` when used in an immutable context.
///
/// Foo[Foo];
/// }
/// ```
-#[cfg(not(stage0))] // NOTE(stage0) remove cfg after a snapshot
#[lang="index"]
pub trait Index<Sized? Index> for Sized? {
type Sized? Output;
fn index<'a>(&'a self, index: &Index) -> &'a Self::Output;
}
-// NOTE(stage0) remove trait after a snapshot
-#[cfg(stage0)]
-#[allow(missing_docs)]
-#[lang="index_mut"]
-pub trait IndexMut<Sized? Index, Sized? Result> for Sized? {
- /// The method for the indexing (`Foo[Bar]`) operation
- fn index_mut<'a>(&'a mut self, index: &Index) -> &'a mut Result;
-}
-
/// The `IndexMut` trait is used to specify the functionality of indexing
/// operations like `arr[idx]`, when used in a mutable context.
///
/// &mut Foo[Foo];
/// }
/// ```
-#[cfg(not(stage0))] // NOTE(stage0) remove cfg after a snapshot
#[lang="index_mut"]
pub trait IndexMut<Sized? Index> for Sized? {
type Sized? Output;