diff --git a/configure b/configure index a3291725703..f070ae37dda 100755 --- a/configure +++ b/configure @@ -739,6 +739,7 @@ do make_dir $h/test/doc-tutorial-ffi make_dir $h/test/doc-tutorial-macros make_dir $h/test/doc-tutorial-borrowed-ptr + make_dir $h/test/doc-tutorial-container make_dir $h/test/doc-tutorial-tasks make_dir $h/test/doc-tutorial-conditions make_dir $h/test/doc-rust diff --git a/doc/tutorial-container.md b/doc/tutorial-container.md index bd706d41288..37ca561f74a 100644 --- a/doc/tutorial-container.md +++ b/doc/tutorial-container.md @@ -163,7 +163,7 @@ assert_eq!(sum, 57); The `for` keyword can be used as sugar for iterating through any iterator: ~~~ -let xs = [2, 3, 5, 7, 11, 13, 17]; +let xs = [2u, 3, 5, 7, 11, 13, 17]; // print out all the elements in the vector for x in xs.iter() { @@ -219,7 +219,7 @@ Containers can provide conversion from iterators through `collect` by implementing the `FromIterator` trait. For example, the implementation for vectors is as follows: -~~~ +~~~ {.xfail-test} impl FromIterator for ~[A] { pub fn from_iterator>(iterator: &mut T) -> ~[A] { let (lower, _) = iterator.size_hint(); @@ -237,7 +237,7 @@ impl FromIterator for ~[A] { The `Iterator` trait provides a `size_hint` default method, returning a lower bound and optionally on upper bound on the length of the iterator: -~~~ +~~~ {.xfail-test} fn size_hint(&self) -> (uint, Option) { (0, None) } ~~~ diff --git a/mk/tests.mk b/mk/tests.mk index 4732f808457..02fcf61412f 100644 --- a/mk/tests.mk +++ b/mk/tests.mk @@ -20,7 +20,7 @@ TEST_CRATES = $(TEST_TARGET_CRATES) $(TEST_HOST_CRATES) # Markdown files under doc/ that should have their code extracted and run DOC_TEST_NAMES = tutorial tutorial-ffi tutorial-macros tutorial-borrowed-ptr \ - tutorial-tasks tutorial-conditions rust + tutorial-tasks tutorial-conditions tutorial-container rust ###################################################################### # Environment configuration diff --git a/src/libstd/prelude.rs b/src/libstd/prelude.rs index 7a0346c94fc..e91c78e8223 100644 --- a/src/libstd/prelude.rs +++ b/src/libstd/prelude.rs @@ -50,9 +50,9 @@ pub use char::Char; pub use container::{Container, Mutable, Map, MutableMap, Set, MutableSet}; pub use hash::Hash; pub use iter::Times; -pub use iterator::Extendable; -pub use iterator::{Iterator, DoubleEndedIterator, ClonableIterator, OrdIterator}; -pub use iterator::MutableDoubleEndedIterator; +pub use iterator::{FromIterator, Extendable}; +pub use iterator::{Iterator, DoubleEndedIterator, RandomAccessIterator, ClonableIterator}; +pub use iterator::{OrdIterator, MutableDoubleEndedIterator}; pub use num::{Num, NumCast, CheckedAdd, CheckedSub, CheckedMul}; pub use num::{Orderable, Signed, Unsigned, Round}; pub use num::{Algebraic, Trigonometric, Exponential, Hyperbolic};