diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4d1a7c74d..dca25cc65 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -287,7 +287,7 @@ jobs: - name: Generate documentation run: cargo doc --workspace --all-features --no-deps env: - RUSTDOCFLAGS: --cfg __time_03_docs + RUSTDOCFLAGS: --cfg docsrs publish-documentation: name: Publish docs diff --git a/time/Cargo.toml b/time/Cargo.toml index 834a5479c..00f46f457 100644 --- a/time/Cargo.toml +++ b/time/Cargo.toml @@ -27,7 +27,7 @@ workspace = true [package.metadata.docs.rs] all-features = true targets = ["x86_64-unknown-linux-gnu"] -rustdoc-args = ["--cfg", "__time_03_docs", "--generate-link-to-definition"] +rustdoc-args = ["--generate-link-to-definition"] [features] default = ["std"] diff --git a/time/src/formatting/formattable.rs b/time/src/formatting/formattable.rs index 7ee17a5cc..7cfa9301e 100644 --- a/time/src/formatting/formattable.rs +++ b/time/src/formatting/formattable.rs @@ -21,7 +21,7 @@ use crate::{error, Date, Time, UtcOffset}; /// /// [`Date::format`] and [`Time::format`] each use a format description to generate /// a String from their data. See the respective methods for usage examples. -#[cfg_attr(__time_03_docs, doc(notable_trait))] +#[cfg_attr(docsrs, doc(notable_trait))] pub trait Formattable: sealed::Sealed {} impl Formattable for BorrowedFormatItem<'_> {} impl Formattable for [BorrowedFormatItem<'_>] {} diff --git a/time/src/lib.rs b/time/src/lib.rs index 511df04de..05fbdafdd 100644 --- a/time/src/lib.rs +++ b/time/src/lib.rs @@ -67,7 +67,7 @@ //! well as obtaining the UTC offset from JavaScript. #![doc(html_playground_url = "https://play.rust-lang.org")] -#![cfg_attr(__time_03_docs, feature(doc_auto_cfg, doc_notable_trait))] +#![cfg_attr(docsrs, feature(doc_auto_cfg, doc_notable_trait))] #![no_std] #![doc(html_favicon_url = "https://avatars0.githubusercontent.com/u/55999857")] #![doc(html_logo_url = "https://avatars0.githubusercontent.com/u/55999857")] diff --git a/time/src/parsing/parsable.rs b/time/src/parsing/parsable.rs index 1679f6368..bad81e652 100644 --- a/time/src/parsing/parsable.rs +++ b/time/src/parsing/parsable.rs @@ -15,7 +15,7 @@ use crate::parsing::{Parsed, ParsedItem}; use crate::{error, Date, Month, OffsetDateTime, Time, UtcOffset, Weekday}; /// A type that can be parsed. -#[cfg_attr(__time_03_docs, doc(notable_trait))] +#[cfg_attr(docsrs, doc(notable_trait))] #[doc(alias = "Parseable")] pub trait Parsable: sealed::Sealed {} impl Parsable for BorrowedFormatItem<'_> {}