File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -532,7 +532,14 @@ impl<I: DoubleEndedIterator + ?Sized> DoubleEndedIterator for Box<I> {
532532 }
533533}
534534#[ stable( feature = "rust1" , since = "1.0.0" ) ]
535- impl < I : ExactSizeIterator + ?Sized > ExactSizeIterator for Box < I > { }
535+ impl < I : ExactSizeIterator + ?Sized > ExactSizeIterator for Box < I > {
536+ fn len ( & self ) -> usize {
537+ ( * * self ) . len ( )
538+ }
539+ fn is_empty ( & self ) -> bool {
540+ ( * * self ) . is_empty ( )
541+ }
542+ }
536543
537544#[ unstable( feature = "fused" , issue = "35602" ) ]
538545impl < I : FusedIterator + ?Sized > FusedIterator for Box < I > { }
Original file line number Diff line number Diff line change 7979#![ feature( core_intrinsics) ]
8080#![ feature( custom_attribute) ]
8181#![ feature( dropck_parametricity) ]
82+ #![ cfg_attr( not( test) , feature( exact_size_is_empty) ) ]
8283#![ feature( fundamental) ]
8384#![ feature( lang_items) ]
8485#![ feature( needs_allocator) ]
You can’t perform that action at this time.
0 commit comments