Skip to content

Commit

Permalink
Rename docsrs flag to rune_docs (relates tokio-rs/tokio#6165)
Browse files Browse the repository at this point in the history
  • Loading branch information
udoprog committed Nov 28, 2023
1 parent e309b3e commit 8e2a0d2
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ jobs:
- uses: Swatinem/rust-cache@v2
- run: cargo doc -p rune --all-features
env:
RUSTFLAGS: --cfg docsrs
RUSTDOCFLAGS: --cfg docsrs
RUSTFLAGS: --cfg rune_docsrs
RUSTDOCFLAGS: --cfg rune_docsrs

basics:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ jobs:
- run: cargo +nightly doc -p rune --all-features
env:
RUST_LOG: rune=info
RUSTFLAGS: --cfg docsrs
RUSTDOCFLAGS: --cfg docsrs
RUSTFLAGS: --cfg rune_docsrs
RUSTDOCFLAGS: --cfg rune_docsrs
- run: mv target/doc target/site/api
- uses: peaceiris/actions-gh-pages@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion crates/rune/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ trybuild = "1.0.80"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "rune_docsrs"]
10 changes: 5 additions & 5 deletions crates/rune/src/internal_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ macro_rules! cfg_emit {
($($item:item)*) => {
$(
#[cfg(feature = "emit")]
#[cfg_attr(docsrs, doc(cfg(feature = "emit")))]
#[cfg_attr(rune_docsrs, doc(cfg(feature = "emit")))]
$item
)*
}
Expand All @@ -85,7 +85,7 @@ macro_rules! cfg_workspace {
($($item:item)*) => {
$(
#[cfg(feature = "workspace")]
#[cfg_attr(docsrs, doc(cfg(feature = "workspace")))]
#[cfg_attr(rune_docsrs, doc(cfg(feature = "workspace")))]
$item
)*
}
Expand All @@ -95,7 +95,7 @@ macro_rules! cfg_cli {
($($item:item)*) => {
$(
#[cfg(feature = "cli")]
#[cfg_attr(docsrs, doc(cfg(feature = "cli")))]
#[cfg_attr(rune_docsrs, doc(cfg(feature = "cli")))]
$item
)*
}
Expand All @@ -105,7 +105,7 @@ macro_rules! cfg_doc {
($($item:item)*) => {
$(
#[cfg(feature = "doc")]
#[cfg_attr(docsrs, doc(cfg(feature = "doc")))]
#[cfg_attr(rune_docsrs, doc(cfg(feature = "doc")))]
$item
)*
}
Expand All @@ -115,7 +115,7 @@ macro_rules! cfg_std {
($($item:item)*) => {
$(
#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
#[cfg_attr(rune_docsrs, doc(cfg(feature = "std")))]
$item
)*
}
Expand Down
2 changes: 1 addition & 1 deletion crates/rune/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
#![allow(clippy::type_complexity)]
#![allow(clippy::module_inception)]
#![allow(clippy::self_named_constructors)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![cfg_attr(rune_docsrs, feature(doc_cfg))]

#[cfg(feature = "std")]
#[macro_use]
Expand Down

0 comments on commit 8e2a0d2

Please sign in to comment.