From 3724b9e2e4c2a2e69337b6d809949b246d3fef39 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 27 Dec 2023 11:30:42 -0600 Subject: [PATCH] docs: Include more content on docs.rs --- clap_complete/Cargo.toml | 5 ++++- clap_complete/src/lib.rs | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/clap_complete/Cargo.toml b/clap_complete/Cargo.toml index 7e29bfb6108..109498ad5fd 100644 --- a/clap_complete/Cargo.toml +++ b/clap_complete/Cargo.toml @@ -16,7 +16,9 @@ rust-version.workspace = true include.workspace = true [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] pre-release-replacements = [ @@ -52,5 +54,6 @@ required-features = ["unstable-dynamic"] [features] 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"] debug = ["clap/debug"] diff --git a/clap_complete/src/lib.rs b/clap_complete/src/lib.rs index a44288220e7..18fb282654f 100644 --- a/clap_complete/src/lib.rs +++ b/clap_complete/src/lib.rs @@ -7,6 +7,7 @@ #![doc(html_logo_url = "https://raw.githubusercontent.com/clap-rs/clap/master/assets/clap.png")] #![doc = include_str!("../README.md")] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![warn(missing_docs, trivial_casts, unused_allocation, trivial_numeric_casts)] #![forbid(unsafe_code)] #![allow(clippy::needless_doctest_main)]