@@ -57,8 +57,8 @@ use crate::{DateTime, Datelike, TimeDelta, Timelike, Weekday};
57
57
///
58
58
/// Let's see how `Parsed` correctly detects the second RFC 2822 string from before is inconsistent.
59
59
///
60
- # [ cfg_attr ( not ( feature = "alloc" ) , doc = " ```ignore" ) ]
61
- # [ cfg_attr ( feature = "alloc" , doc = "```rust" ) ]
60
+ /// ```
61
+ /// # #[cfg (feature = "alloc")] {
62
62
/// use chrono::format::{ParseErrorKind, Parsed};
63
63
/// use chrono::Weekday;
64
64
///
@@ -89,6 +89,7 @@ use crate::{DateTime, Datelike, TimeDelta, Timelike, Weekday};
89
89
/// if let Err(error) = result {
90
90
/// assert_eq!(error.kind(), ParseErrorKind::Impossible);
91
91
/// }
92
+ /// # }
92
93
/// # Ok::<(), chrono::ParseError>(())
93
94
/// ```
94
95
///
@@ -98,8 +99,8 @@ use crate::{DateTime, Datelike, TimeDelta, Timelike, Weekday};
98
99
/// [RFC2822 formatting item]: crate::format::Fixed::RFC2822
99
100
/// [`format::parse()`]: crate::format::parse()
100
101
///
101
- # [ cfg_attr ( not ( feature = "alloc" ) , doc = " ```ignore" ) ]
102
- # [ cfg_attr ( feature = "alloc" , doc = "```rust" ) ]
102
+ /// ```
103
+ /// # #[cfg (feature = "alloc")] {
103
104
/// use chrono::format::{parse, Fixed, Item, Parsed};
104
105
/// use chrono::Weekday;
105
106
///
@@ -120,6 +121,7 @@ use crate::{DateTime, Datelike, TimeDelta, Timelike, Weekday};
120
121
/// // What is the weekday?
121
122
/// assert_eq!(parsed.weekday(), Some(Weekday::Thu));
122
123
/// }
124
+ /// # }
123
125
/// # Ok::<(), chrono::ParseError>(())
124
126
/// ```
125
127
#[ allow( clippy:: manual_non_exhaustive) ]
0 commit comments