From 5a4910a9f82feb643b492c434d140580ef9665dc Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Sat, 4 Mar 2023 11:21:31 +0100 Subject: [PATCH] Enable `doc_auto_cfg` on `docs.rs` builds --- Cargo.toml | 4 ++++ src/lib.rs | 1 + 2 files changed, 5 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index a54019a9..3e72bbba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,12 +32,16 @@ nightly = ["const_fn", "step_trait", "abi_x86_interrupt"] abi_x86_interrupt = [] const_fn = [] step_trait = [] +doc_auto_cfg = [] # These features are no longer used and only there for backwards compatibility. external_asm = [] inline_asm = [] doc_cfg = [] +[package.metadata.docs.rs] +all-features = true + [package.metadata.release] dev-version = false pre-release-replacements = [ diff --git a/src/lib.rs b/src/lib.rs index 43cb39ae..372e7a9a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,6 +5,7 @@ #![cfg_attr(feature = "const_fn", feature(const_mut_refs))] // GDT add_entry() #![cfg_attr(feature = "abi_x86_interrupt", feature(abi_x86_interrupt))] #![cfg_attr(feature = "step_trait", feature(step_trait))] +#![cfg_attr(feature = "doc_auto_cfg", feature(doc_auto_cfg))] #![warn(missing_docs)] #![deny(missing_debug_implementations)] #![deny(unsafe_op_in_unsafe_fn)]