Merge pull request #5273 from epage/docsrs

docs: Include more content on docs.rs
This commit is contained in:
Ed Page 2023-12-27 11:47:04 -06:00 committed by GitHub
commit 3630e582d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -16,7 +16,9 @@ rust-version.workspace = true
include.workspace = true include.workspace = true
[package.metadata.docs.rs] [package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"] features = ["unstable-doc"]
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
[package.metadata.release] [package.metadata.release]
pre-release-replacements = [ pre-release-replacements = [
@ -52,5 +54,6 @@ required-features = ["unstable-dynamic"]
[features] [features]
default = [] default = []
unstable-doc = ["unstable-dynamic"] # for docs.rs
unstable-dynamic = ["dep:clap_lex", "dep:shlex", "dep:unicode-xid", "clap/derive", "dep:is_executable", "dep:pathdiff"] unstable-dynamic = ["dep:clap_lex", "dep:shlex", "dep:unicode-xid", "clap/derive", "dep:is_executable", "dep:pathdiff"]
debug = ["clap/debug"] debug = ["clap/debug"]

View file

@ -7,6 +7,7 @@
#![doc(html_logo_url = "https://raw.githubusercontent.com/clap-rs/clap/master/assets/clap.png")] #![doc(html_logo_url = "https://raw.githubusercontent.com/clap-rs/clap/master/assets/clap.png")]
#![doc = include_str!("../README.md")] #![doc = include_str!("../README.md")]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![warn(missing_docs, trivial_casts, unused_allocation, trivial_numeric_casts)] #![warn(missing_docs, trivial_casts, unused_allocation, trivial_numeric_casts)]
#![forbid(unsafe_code)] #![forbid(unsafe_code)]
#![allow(clippy::needless_doctest_main)] #![allow(clippy::needless_doctest_main)]