aboutsummaryrefslogtreecommitdiff
path: root/crates/test_utils
diff options
context:
space:
mode:
Diffstat (limited to 'crates/test_utils')
-rw-r--r--crates/test_utils/src/minicore.rs30
1 files changed, 30 insertions, 0 deletions
diff --git a/crates/test_utils/src/minicore.rs b/crates/test_utils/src/minicore.rs
index e04ca58d2..011d460be 100644
--- a/crates/test_utils/src/minicore.rs
+++ b/crates/test_utils/src/minicore.rs
@@ -20,6 +20,7 @@
20//! future: pin 20//! future: pin
21//! option: 21//! option:
22//! result: 22//! result:
23//! iterator: option
23 24
24pub mod marker { 25pub mod marker {
25 // region:sized 26 // region:sized
@@ -206,9 +207,38 @@ pub mod task {
206} 207}
207// endregion:future 208// endregion:future
208 209
210// region:iterator
211pub mod iter {
212 mod traits {
213 mod iterator {
214 pub trait Iterator {
215 type Item;
216 #[lang = "next"]
217 fn next(&mut self) -> Option<Self::Item>;
218 fn nth(&mut self, n: usize) -> Option<Self::Item> {
219 loop {}
220 }
221 }
222 }
223 mod collect {
224 pub trait IntoIterator {
225 type Item;
226 type IntoIter: Iterator<Item = Self::Item>;
227 #[lang = "into_iter"]
228 fn into_iter(self) -> Self::IntoIter;
229 }
230 }
231 pub use self::collect::IntoIterator;
232 pub use self::iterator::Iterator;
233 }
234 pub use self::traits::{IntoIterator, Iterator};
235}
236// endregion:iterator
237
209pub mod prelude { 238pub mod prelude {
210 pub mod v1 { 239 pub mod v1 {
211 pub use crate::{ 240 pub use crate::{
241 iter::{IntoIterator, Iterator}, // :iterator
212 marker::Sized, // :sized 242 marker::Sized, // :sized
213 ops::{Fn, FnMut, FnOnce}, // :fn 243 ops::{Fn, FnMut, FnOnce}, // :fn
214 option::Option::{self, None, Some}, // :option 244 option::Option::{self, None, Some}, // :option