diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2018-02-12 09:13:47 +0100 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2018-02-12 09:13:47 +0100 |
| commit | f025eff21d1832fcd3941ae847fec2aaf23d3b0b (patch) | |
| tree | 2e5bacead5969cefdc72109303fdb41a8ffb6485 /src/libcore/tests | |
| parent | 1af9ee1350cc69e7c1873d26637064824d07c2b8 (diff) | |
| download | rust-f025eff21d1832fcd3941ae847fec2aaf23d3b0b.tar.gz rust-f025eff21d1832fcd3941ae847fec2aaf23d3b0b.zip | |
core::iter::repeat_with: fix tests
Diffstat (limited to 'src/libcore/tests')
| -rw-r--r-- | src/libcore/tests/iter.rs | 3 | ||||
| -rw-r--r-- | src/libcore/tests/lib.rs | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/libcore/tests/iter.rs b/src/libcore/tests/iter.rs index ca5318d198e..f42970685f5 100644 --- a/src/libcore/tests/iter.rs +++ b/src/libcore/tests/iter.rs @@ -1551,6 +1551,7 @@ fn test_repeat_take_collect() { #[test] fn test_repeat_with() { + #[derive(PartialEq, Debug)] struct NotClone(usize); let mut it = repeat_with(|| NotClone(42)); assert_eq!(it.next(), Some(NotClone(42))); @@ -1586,7 +1587,7 @@ fn test_repeat_with_take() { } #[test] -fn test_repeat_take_collect() { +fn test_repeat_with_take_collect() { let mut curr = 1; let v: Vec<_> = repeat_with(|| { let tmp = curr; curr *= 2; tmp }) .take(5).collect(); diff --git a/src/libcore/tests/lib.rs b/src/libcore/tests/lib.rs index 9e90313bc0e..2b9fae88bf4 100644 --- a/src/libcore/tests/lib.rs +++ b/src/libcore/tests/lib.rs @@ -27,6 +27,7 @@ #![feature(iterator_try_fold)] #![feature(iter_rfind)] #![feature(iter_rfold)] +#![feature(iterator_repeat_with)] #![feature(nonzero)] #![feature(pattern)] #![feature(raw)] |
