Skip to content

Commit aca5c36

Browse files
committed
Use docsrs instead of custom cfg
1 parent a65ef0e commit aca5c36

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ jobs:
287287
- name: Generate documentation
288288
run: cargo doc --workspace --all-features --no-deps
289289
env:
290-
RUSTDOCFLAGS: --cfg __time_03_docs
290+
RUSTDOCFLAGS: --cfg docsrs
291291

292292
publish-documentation:
293293
name: Publish docs

time/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ workspace = true
2727
[package.metadata.docs.rs]
2828
all-features = true
2929
targets = ["x86_64-unknown-linux-gnu"]
30-
rustdoc-args = ["--cfg", "__time_03_docs", "--generate-link-to-definition"]
30+
rustdoc-args = ["--generate-link-to-definition"]
3131

3232
[features]
3333
default = ["std"]

time/src/formatting/formattable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use crate::{error, Date, Time, UtcOffset};
2121
///
2222
/// [`Date::format`] and [`Time::format`] each use a format description to generate
2323
/// a String from their data. See the respective methods for usage examples.
24-
#[cfg_attr(__time_03_docs, doc(notable_trait))]
24+
#[cfg_attr(docsrs, doc(notable_trait))]
2525
pub trait Formattable: sealed::Sealed {}
2626
impl Formattable for BorrowedFormatItem<'_> {}
2727
impl Formattable for [BorrowedFormatItem<'_>] {}

time/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
//! well as obtaining the UTC offset from JavaScript.
6868
6969
#![doc(html_playground_url = "https://play.rust-lang.org")]
70-
#![cfg_attr(__time_03_docs, feature(doc_auto_cfg, doc_notable_trait))]
70+
#![cfg_attr(docsrs, feature(doc_auto_cfg, doc_notable_trait))]
7171
#![no_std]
7272
#![doc(html_favicon_url = "https://avatars0.githubusercontent.com/u/55999857")]
7373
#![doc(html_logo_url = "https://avatars0.githubusercontent.com/u/55999857")]

time/src/parsing/parsable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use crate::parsing::{Parsed, ParsedItem};
1515
use crate::{error, Date, Month, OffsetDateTime, Time, UtcOffset, Weekday};
1616

1717
/// A type that can be parsed.
18-
#[cfg_attr(__time_03_docs, doc(notable_trait))]
18+
#[cfg_attr(docsrs, doc(notable_trait))]
1919
#[doc(alias = "Parseable")]
2020
pub trait Parsable: sealed::Sealed {}
2121
impl Parsable for BorrowedFormatItem<'_> {}

0 commit comments

Comments
 (0)