Update scrape examples options

This commit is contained in:
Maybe Waffle 2022-12-28 23:16:23 +04:00
parent 0253979e36
commit 867adbb20b
3 changed files with 13 additions and 3 deletions

View file

@ -4,7 +4,7 @@
#
# "tokio/macros" and "tokio/rt-multi-thread" are required for examples
docs = """doc
-Zrustdoc-scrape-examples=examples
-Zrustdoc-scrape-examples
--features=full --features=nightly
--features=tokio/macros --features=tokio/rt-multi-thread
"""

View file

@ -94,13 +94,18 @@ features = ["full", "nightly", "tokio/macros", "tokio/rt-multi-thread"]
rustdoc-args = ["--cfg", "docsrs", "-Znormalize-docs"]
# https://github.com/rust-lang/rust/issues/88791
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples=examples"]
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
[[example]]
name = "self_info"
required-features = ["tokio/macros", "tokio/rt-multi-thread"]
# This is required due to some stuff with dev-dependencies,
# backwards compatability and cargo:
# https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#scrape-examples
doc-scrape-examples = true
[[example]]
name = "erased"
required-features = ["tokio/macros", "tokio/rt-multi-thread", "erased", "trace_adaptor"]

View file

@ -122,7 +122,7 @@ all-features = true
# FIXME: Add back "-Znormalize-docs" when https://github.com/rust-lang/rust/issues/93703 is fixed
rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "dep_docsrs"]
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples=examples"]
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
[[test]]
@ -140,6 +140,11 @@ required-features = ["sqlite-storage", "cbor-serializer", "bincode-serializer"]
name = "admin"
required-features = ["macros", "ctrlc_handler"]
# This is required due to some stuff with dev-dependencies,
# backwards compatability and cargo:
# https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#scrape-examples
doc-scrape-examples = true
[[example]]
name = "buttons"
required-features = ["macros", "ctrlc_handler"]