alloc: Forward ExactSizeIterator methods in Iterator for Box<I>
This commit is contained in:
parent
705e295b7b
commit
d53f82c1d0
@ -532,7 +532,14 @@ impl<I: DoubleEndedIterator + ?Sized> DoubleEndedIterator for Box<I> {
|
||||
}
|
||||
}
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<I: ExactSizeIterator + ?Sized> ExactSizeIterator for Box<I> {}
|
||||
impl<I: ExactSizeIterator + ?Sized> ExactSizeIterator for Box<I> {
|
||||
fn len(&self) -> usize {
|
||||
(**self).len()
|
||||
}
|
||||
fn is_empty(&self) -> bool {
|
||||
(**self).is_empty()
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "fused", issue = "35602")]
|
||||
impl<I: FusedIterator + ?Sized> FusedIterator for Box<I> {}
|
||||
|
@ -79,6 +79,7 @@
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(custom_attribute)]
|
||||
#![feature(dropck_parametricity)]
|
||||
#![cfg_attr(not(test), feature(exact_size_is_empty))]
|
||||
#![feature(fundamental)]
|
||||
#![feature(lang_items)]
|
||||
#![feature(needs_allocator)]
|
||||
|
Loading…
Reference in New Issue
Block a user