Skip to content

Commit b6e51aa

Browse files
committed
Fix doctest better
1 parent 0d855eb commit b6e51aa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

library/core/src/iter/sources/generator.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
///
1010
/// ```
1111
/// #![feature(iter_macro, coroutines)]
12+
/// # #[cfg(not(bootstrap))]
13+
/// # {
1214
///
1315
/// let it = std::iter::iter!{|| {
1416
/// yield 1;
@@ -17,6 +19,7 @@
1719
/// } }();
1820
/// let v: Vec<_> = it.collect();
1921
/// assert_eq!(v, [1, 2, 3]);
22+
/// # }
2023
/// ```
2124
#[unstable(feature = "iter_macro", issue = "none", reason = "generators are unstable")]
2225
#[allow_internal_unstable(coroutines, iter_from_coroutine)]

0 commit comments

Comments
 (0)