diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-10-20 15:00:11 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-10-20 21:14:02 +0000 |
| commit | 3beadb5ebdb818f8f18e90bf6d3ebf964b342e51 (patch) | |
| tree | 45704256f1318dcf589e692d0454127ba7dd468f | |
| parent | 5c1872d7ae10193ec41075c7ebc21bd43a236f53 (diff) | |
| download | rust-3beadb5ebdb818f8f18e90bf6d3ebf964b342e51.tar.gz rust-3beadb5ebdb818f8f18e90bf6d3ebf964b342e51.zip | |
Fix stage0 core tests
| -rw-r--r-- | library/core/src/iter/sources/from_coroutine.rs | 3 | ||||
| -rw-r--r-- | library/core/src/ops/coroutine.rs | 4 | ||||
| -rw-r--r-- | library/core/src/pin.rs | 4 |
3 files changed, 8 insertions, 3 deletions
diff --git a/library/core/src/iter/sources/from_coroutine.rs b/library/core/src/iter/sources/from_coroutine.rs index bf413b24d41..16fbca9b65e 100644 --- a/library/core/src/iter/sources/from_coroutine.rs +++ b/library/core/src/iter/sources/from_coroutine.rs @@ -11,7 +11,8 @@ use crate::pin::Pin; /// # Examples /// /// ``` -/// #![feature(coroutines)] +/// #![cfg_attr(bootstrap, feature(generators))] +/// #![cfg_attr(not(bootstrap), feature(coroutines))] /// #![feature(iter_from_coroutine)] /// /// let it = std::iter::from_coroutine(|| { diff --git a/library/core/src/ops/coroutine.rs b/library/core/src/ops/coroutine.rs index 4847c052712..e01a893a068 100644 --- a/library/core/src/ops/coroutine.rs +++ b/library/core/src/ops/coroutine.rs @@ -40,7 +40,9 @@ pub enum CoroutineState<Y, R> { /// closure-like: /// /// ```rust -/// #![feature(coroutines, coroutine_trait)] +/// #![cfg_attr(bootstrap, feature(generators))] +/// #![cfg_attr(not(bootstrap), feature(coroutines))] +/// #![feature(coroutine_trait)] /// /// use std::ops::{Coroutine, CoroutineState}; /// use std::pin::Pin; diff --git a/library/core/src/pin.rs b/library/core/src/pin.rs index 322b455841b..bca97d4ee36 100644 --- a/library/core/src/pin.rs +++ b/library/core/src/pin.rs @@ -1088,7 +1088,9 @@ impl<P, U> DispatchFromDyn<Pin<U>> for Pin<P> where P: DispatchFromDyn<U> {} /// ### With `Coroutine`s /// /// ```rust -/// #![feature(coroutines, coroutine_trait)] +/// #![cfg_attr(bootstrap, feature(generators))] +/// #![cfg_attr(not(bootstrap), feature(coroutines))] +/// #![feature(coroutine_trait)] /// use core::{ /// ops::{Coroutine, CoroutineState}, /// pin::pin, |
