/// ```
#[lang = "index"]
#[rustc_on_unimplemented(
- message="the type `{Self}` cannot be indexed by `{Idx}`",
- label="`{Self}` cannot be indexed by `{Idx}`",
+ message = "the type `{Self}` cannot be indexed by `{Idx}`",
+ label = "`{Self}` cannot be indexed by `{Idx}`"
)]
#[stable(feature = "rust1", since = "1.0.0")]
#[doc(alias = "]")]
#[lang = "index_mut"]
#[rustc_on_unimplemented(
on(
- _Self="&str",
- note="you can use `.chars().nth()` or `.bytes().nth()`
+ _Self = "&str",
+ note = "you can use `.chars().nth()` or `.bytes().nth()`
see chapter in The Book <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>"
),
on(
- _Self="str",
- note="you can use `.chars().nth()` or `.bytes().nth()`
+ _Self = "str",
+ note = "you can use `.chars().nth()` or `.bytes().nth()`
see chapter in The Book <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>"
),
on(
- _Self="std::string::String",
- note="you can use `.chars().nth()` or `.bytes().nth()`
+ _Self = "std::string::String",
+ note = "you can use `.chars().nth()` or `.bytes().nth()`
see chapter in The Book <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>"
),
- message="the type `{Self}` cannot be mutably indexed by `{Idx}`",
- label="`{Self}` cannot be mutably indexed by `{Idx}`",
+ message = "the type `{Self}` cannot be mutably indexed by `{Idx}`",
+ label = "`{Self}` cannot be mutably indexed by `{Idx}`"
)]
#[stable(feature = "rust1", since = "1.0.0")]
#[doc(alias = "[")]