File tree Expand file tree Collapse file tree 4 files changed +5
-0
lines changed Expand file tree Collapse file tree 4 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -368,6 +368,7 @@ pub trait Into<T>: Sized {
368
368
all( _Self = "&str" , T = "std::string::String" ) ,
369
369
note = "to coerce a `{T}` into a `{Self}`, use `&*` as a prefix" ,
370
370
) ) ]
371
+ #[ const_trait]
371
372
pub trait From < T > : Sized {
372
373
/// Converts to this type from the input type.
373
374
#[ lang = "from" ]
Original file line number Diff line number Diff line change 99
99
/// ```
100
100
#[ cfg_attr( not( test) , rustc_diagnostic_item = "Default" ) ]
101
101
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
102
+ #[ const_trait]
102
103
pub trait Default : Sized {
103
104
/// Returns the "default value" for a type.
104
105
///
Original file line number Diff line number Diff line change 55
55
#[ doc( alias = "]" ) ]
56
56
#[ doc( alias = "[" ) ]
57
57
#[ doc( alias = "[]" ) ]
58
+ #[ const_trait]
58
59
pub trait Index < Idx : ?Sized > {
59
60
/// The returned type after indexing.
60
61
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -163,6 +164,7 @@ see chapter in The Book <https://doc.rust-lang.org/book/ch08-02-strings.html#ind
163
164
#[ doc( alias = "[" ) ]
164
165
#[ doc( alias = "]" ) ]
165
166
#[ doc( alias = "[]" ) ]
167
+ #[ const_trait]
166
168
pub trait IndexMut < Idx : ?Sized > : Index < Idx > {
167
169
/// Performs the mutable indexing (`container[index]`) operation.
168
170
///
Original file line number Diff line number Diff line change @@ -158,6 +158,7 @@ mod private_slice_index {
158
158
message = "the type `{T}` cannot be indexed by `{Self}`" ,
159
159
label = "slice indices are of type `usize` or ranges of `usize`"
160
160
) ]
161
+ #[ const_trait]
161
162
pub unsafe trait SliceIndex < T : ?Sized > : private_slice_index:: Sealed {
162
163
/// The output type returned by methods.
163
164
#[ stable( feature = "slice_get_slice" , since = "1.28.0" ) ]
You can’t perform that action at this time.
0 commit comments