Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/test-utils/src/minicore.rs')
| -rw-r--r-- | crates/test-utils/src/minicore.rs | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/crates/test-utils/src/minicore.rs b/crates/test-utils/src/minicore.rs index 140bb08042..b015dd69b5 100644 --- a/crates/test-utils/src/minicore.rs +++ b/crates/test-utils/src/minicore.rs @@ -32,7 +32,7 @@ //! fn: //! from: sized //! future: pin -//! generator: pin +//! coroutine: pin //! hash: //! include: //! index: sized @@ -798,26 +798,26 @@ pub mod ops { // endregion:builtin_impls // endregion:add - // region:generator - mod generator { + // region:coroutine + mod coroutine { use crate::pin::Pin; - #[lang = "generator"] - pub trait Generator<R = ()> { + #[lang = "coroutine"] + pub trait Coroutine<R = ()> { type Yield; - #[lang = "generator_return"] + #[lang = "coroutine_return"] type Return; - fn resume(self: Pin<&mut Self>, arg: R) -> GeneratorState<Self::Yield, Self::Return>; + fn resume(self: Pin<&mut Self>, arg: R) -> CoroutineState<Self::Yield, Self::Return>; } - #[lang = "generator_state"] - pub enum GeneratorState<Y, R> { + #[lang = "coroutine_state"] + pub enum CoroutineState<Y, R> { Yielded(Y), Complete(R), } } - pub use self::generator::{Generator, GeneratorState}; - // endregion:generator + pub use self::coroutine::{Coroutine, CoroutineState}; + // endregion:coroutine } // region:eq @@ -1166,6 +1166,7 @@ pub mod future { task::{Context, Poll}, }; + #[doc(notable_trait)] #[lang = "future_trait"] pub trait Future { type Output; @@ -1264,6 +1265,7 @@ pub mod iter { mod traits { mod iterator { + #[doc(notable_trait)] pub trait Iterator { type Item; #[lang = "next"] |