Add more const_trait
annotations
This commit is contained in:
parent
be65e03676
commit
4b539b04a6
5 changed files with 26 additions and 3 deletions
|
@ -55,7 +55,7 @@
|
|||
#[doc(alias = "]")]
|
||||
#[doc(alias = "[")]
|
||||
#[doc(alias = "[]")]
|
||||
#[const_trait]
|
||||
#[cfg_attr(not(bootstrap), const_trait)]
|
||||
pub trait Index<Idx: ?Sized> {
|
||||
/// The returned type after indexing.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
@ -164,7 +164,7 @@ see chapter in The Book <https://doc.rust-lang.org/book/ch08-02-strings.html#ind
|
|||
#[doc(alias = "[")]
|
||||
#[doc(alias = "]")]
|
||||
#[doc(alias = "[]")]
|
||||
#[const_trait]
|
||||
#[cfg_attr(not(bootstrap), const_trait)]
|
||||
pub trait IndexMut<Idx: ?Sized>: Index<Idx> {
|
||||
/// Performs the mutable indexing (`container[index]`) operation.
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue