diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index 51549f92d4db..1e3ccf90eb87 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -662,6 +662,9 @@ impl DoubleEndedIterator for Box { fn next_back(&mut self) -> Option { (**self).next_back() } + fn nth_back(&mut self, n: usize) -> Option { + (**self).nth_back(n) + } } #[stable(feature = "rust1", since = "1.0.0")] impl ExactSizeIterator for Box { diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 95b9dacf8565..da1afc2ff8aa 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -115,6 +115,7 @@ #![feature(maybe_uninit)] #![feature(alloc_layout_extra)] #![feature(try_trait)] +#![feature(iter_nth_back)] // Allow testing this library