-
Notifications
You must be signed in to change notification settings - Fork 542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use different method to ignore feature-dependent doctests #1534
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1534 +/- ##
==========================================
+ Coverage 91.81% 91.82% +0.01%
==========================================
Files 40 40
Lines 18319 18345 +26
==========================================
+ Hits 16820 16846 +26
Misses 1499 1499 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
@@ -279,6 +278,7 @@ impl<'a> StrftimeItems<'a> { | |||
/// assert_eq!(fmtr.to_string(), "2023년 07월 11일"); | |||
/// let fmtr = dt.format_with_items(StrftimeItems::new_with_locale("%x", Locale::ja_JP)); | |||
/// assert_eq!(fmtr.to_string(), "2023年07月11日"); | |||
/// # } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a matching opening brace...
#[cfg_attr(not(any(feature = "alloc", feature = "std")), doc = "```ignore")] | ||
#[cfg_attr(any(feature = "alloc", feature = "std"), doc = "```rust")] | ||
/// ``` | ||
/// # #[cfg(feature = "alloc")] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is up here.
This will enable an almost clean run with
cargo +nightly fmt -- --config format_code_in_doc_comments=true
.It did not handle a combination of doc comments and
#[cfg_attr(feature = ..., doc = "...")]
well.