Specialize implementations
Implementations in stdlib are now optimized as they were before.
This commit is contained in:
parent
a875876027
commit
bc2f0fb5a9
17 changed files with 403 additions and 109 deletions
|
@ -6,6 +6,7 @@
|
|||
#![feature(unboxed_closures)]
|
||||
#![feature(test)]
|
||||
#![feature(fn_traits)]
|
||||
#![feature(trusted_step)]
|
||||
|
||||
pub mod bit_set;
|
||||
pub mod vec;
|
||||
|
|
|
@ -204,6 +204,9 @@ macro_rules! newtype_index {
|
|||
}
|
||||
}
|
||||
|
||||
// Safety: The implementation of `Step` upholds all invariants.
|
||||
unsafe impl ::std::iter::TrustedStep for $type {}
|
||||
|
||||
impl From<$type> for u32 {
|
||||
#[inline]
|
||||
fn from(v: $type) -> u32 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue