mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-21 22:15:13 +01:00
Fix cargo docs
and use --cfg docsrs
in CI
This commit is contained in:
parent
a233c3bcd0
commit
0e3ffc7e77
3 changed files with 10 additions and 3 deletions
|
@ -3,6 +3,8 @@
|
||||||
# https://github.com/rust-lang/cargo/issues/10333
|
# https://github.com/rust-lang/cargo/issues/10333
|
||||||
#
|
#
|
||||||
# "tokio/macros" and "tokio/rt-multi-thread" are required for examples
|
# "tokio/macros" and "tokio/rt-multi-thread" are required for examples
|
||||||
|
#
|
||||||
|
# N.B.: when changing this, also change `package.metadata.docs.rs`
|
||||||
docs = """doc
|
docs = """doc
|
||||||
-Zrustdoc-scrape-examples
|
-Zrustdoc-scrape-examples
|
||||||
--features=full --features=nightly
|
--features=full --features=nightly
|
||||||
|
@ -11,4 +13,10 @@ docs = """doc
|
||||||
|
|
||||||
[build]
|
[build]
|
||||||
# We pass "--cfg docsrs" when building docs to add `This is supported on feature="..." only.`
|
# We pass "--cfg docsrs" when building docs to add `This is supported on feature="..." only.`
|
||||||
rustdocflags = ["--cfg", "docsrs", "-Znormalize-docs"]
|
#
|
||||||
|
# FIXME: add back `-Znormalize-docs` once <https://github.com/rust-lang/rust/issues/81091> is fixed
|
||||||
|
# or we don't depend on `generic-array` anymore
|
||||||
|
#
|
||||||
|
# N.B.: when changing this, also change `RUSTDOCFLAGS` in `.github/workflows/ci.yml` and
|
||||||
|
# `package.metadata.docs.rs.rustdoc-args` in `crates/teloxide/Cargo.toml`
|
||||||
|
rustdocflags = ["--cfg", "docsrs"]
|
||||||
|
|
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -9,7 +9,7 @@ name: Continuous integration
|
||||||
|
|
||||||
env:
|
env:
|
||||||
RUSTFLAGS: "--cfg CI_REDIS -Dwarnings"
|
RUSTFLAGS: "--cfg CI_REDIS -Dwarnings"
|
||||||
RUSTDOCFLAGS: -Dwarnings
|
RUSTDOCFLAGS: "--cfg docsrs -Dwarnings"
|
||||||
RUST_BACKTRACE: short
|
RUST_BACKTRACE: short
|
||||||
|
|
||||||
CARGO_INCREMENTAL: 0
|
CARGO_INCREMENTAL: 0
|
||||||
|
|
|
@ -129,7 +129,6 @@ tokio-stream = "0.1"
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
# NB: can't use `all-features = true`, because `sqlite-storage-nativetls` conflicts with `sqlite-storage-rustls`
|
# NB: can't use `all-features = true`, because `sqlite-storage-nativetls` conflicts with `sqlite-storage-rustls`
|
||||||
features = ["full", "nightly"]
|
features = ["full", "nightly"]
|
||||||
# FIXME: Add back "-Znormalize-docs" when https://github.com/rust-lang/rust/issues/93703 is fixed
|
|
||||||
rustdoc-args = ["--cfg", "docsrs"]
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
rustc-args = ["--cfg", "dep_docsrs"]
|
rustc-args = ["--cfg", "dep_docsrs"]
|
||||||
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||||
|
|
Loading…
Reference in a new issue