Rollup merge of #21658 - Manishearth:index_on_unimplemented, r=Gankro
Helps issues like [these](http://www.reddit.com/r/rust/comments/2tpefm/unable_to_access_array_elements/) r? @Gankro rollup-worthy
This commit is contained in:
commit
28b0271f89
@ -893,6 +893,7 @@ shr_impl_all! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize }
|
||||
/// }
|
||||
/// ```
|
||||
#[lang="index"]
|
||||
#[rustc_on_unimplemented = "the type `{Self}` cannot be indexed by `{Index}`"]
|
||||
#[stable]
|
||||
pub trait Index<Index: ?Sized> {
|
||||
type Output: ?Sized;
|
||||
@ -931,6 +932,7 @@ pub trait Index<Index: ?Sized> {
|
||||
/// }
|
||||
/// ```
|
||||
#[lang="index_mut"]
|
||||
#[rustc_on_unimplemented = "the type `{Self}` cannot be mutably indexed by `{Index}`"]
|
||||
#[stable]
|
||||
pub trait IndexMut<Index: ?Sized> {
|
||||
type Output: ?Sized;
|
||||
|
Loading…
Reference in New Issue
Block a user