From 0652d81977a3a35a6f1b046faf0768246a71a8bf Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Tue, 2 Jul 2024 11:56:53 +0200 Subject: [PATCH] tree-wide: enable doc_cfg and doc_auto_cfg for docs Signed-off-by: Wolfgang Bumiller --- proxmox-access-control/src/lib.rs | 2 ++ proxmox-acme-api/src/lib.rs | 2 ++ proxmox-acme/src/lib.rs | 1 + proxmox-api-macro/src/lib.rs | 1 + proxmox-apt/src/lib.rs | 2 ++ proxmox-async/src/lib.rs | 2 ++ proxmox-auth-api/src/lib.rs | 2 ++ proxmox-borrow/src/lib.rs | 2 ++ proxmox-client/src/lib.rs | 2 ++ proxmox-compression/src/lib.rs | 2 ++ proxmox-config-digest/src/lib.rs | 2 ++ proxmox-dns-api/src/lib.rs | 2 ++ proxmox-http-error/src/lib.rs | 2 ++ proxmox-http/src/lib.rs | 2 ++ proxmox-human-byte/src/lib.rs | 2 ++ proxmox-io/src/lib.rs | 1 + proxmox-lang/src/lib.rs | 2 ++ proxmox-ldap/src/lib.rs | 2 ++ proxmox-login/src/lib.rs | 2 ++ proxmox-metrics/src/lib.rs | 2 ++ proxmox-network-api/src/lib.rs | 2 ++ proxmox-notify/src/lib.rs | 2 ++ proxmox-openid/src/lib.rs | 2 ++ proxmox-product-config/src/lib.rs | 2 ++ proxmox-rest-server/src/lib.rs | 2 ++ proxmox-router/src/lib.rs | 2 ++ proxmox-rrd/src/lib.rs | 2 ++ proxmox-schema/src/lib.rs | 1 + proxmox-section-config/src/lib.rs | 2 ++ proxmox-serde/src/lib.rs | 2 ++ proxmox-shared-memory/src/lib.rs | 2 ++ proxmox-simple-config/src/lib.rs | 2 ++ proxmox-sortable-macro/src/lib.rs | 2 ++ proxmox-subscription/src/lib.rs | 2 ++ proxmox-sys/src/lib.rs | 2 ++ proxmox-syslog-api/src/lib.rs | 2 ++ proxmox-tfa/src/lib.rs | 2 ++ proxmox-time-api/src/lib.rs | 2 ++ proxmox-time/src/lib.rs | 1 + proxmox-uuid/src/lib.rs | 2 ++ 40 files changed, 75 insertions(+) diff --git a/proxmox-access-control/src/lib.rs b/proxmox-access-control/src/lib.rs index 7fabcfb5..c3aeb9db 100644 --- a/proxmox-access-control/src/lib.rs +++ b/proxmox-access-control/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + pub mod types; #[cfg(feature = "impl")] diff --git a/proxmox-acme-api/src/lib.rs b/proxmox-acme-api/src/lib.rs index 09bde85c..623e9e23 100644 --- a/proxmox-acme-api/src/lib.rs +++ b/proxmox-acme-api/src/lib.rs @@ -1,4 +1,6 @@ //! ACME API crate (API types and API implementation) +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + mod types; pub use types::*; diff --git a/proxmox-acme/src/lib.rs b/proxmox-acme/src/lib.rs index 692691bf..5f63806e 100644 --- a/proxmox-acme/src/lib.rs +++ b/proxmox-acme/src/lib.rs @@ -12,6 +12,7 @@ //! The [`Account`] helper supports RSA and ECC keys and provides most of the API methods. #![deny(missing_docs)] +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] #[cfg(feature = "api-types")] pub mod types; diff --git a/proxmox-api-macro/src/lib.rs b/proxmox-api-macro/src/lib.rs index 3c34b48b..0d401f31 100644 --- a/proxmox-api-macro/src/lib.rs +++ b/proxmox-api-macro/src/lib.rs @@ -1,4 +1,5 @@ #![recursion_limit = "256"] +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] extern crate proc_macro; extern crate proc_macro2; diff --git a/proxmox-apt/src/lib.rs b/proxmox-apt/src/lib.rs index 0c93b3e2..60bf1d2a 100644 --- a/proxmox-apt/src/lib.rs +++ b/proxmox-apt/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + pub mod config; pub mod deb822; pub mod repositories; diff --git a/proxmox-async/src/lib.rs b/proxmox-async/src/lib.rs index 5445f681..f9222b9c 100644 --- a/proxmox-async/src/lib.rs +++ b/proxmox-async/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + pub mod blocking; pub mod broadcast_future; pub mod io; diff --git a/proxmox-auth-api/src/lib.rs b/proxmox-auth-api/src/lib.rs index c312aa45..e971216c 100644 --- a/proxmox-auth-api/src/lib.rs +++ b/proxmox-auth-api/src/lib.rs @@ -7,6 +7,8 @@ //! //! The `pam-authenticator` feature enables the `Pam` type. +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + pub const TICKET_LIFETIME: i64 = 3600 * 2; // 2 hours #[cfg(feature = "ticket")] diff --git a/proxmox-borrow/src/lib.rs b/proxmox-borrow/src/lib.rs index 36a2e90f..798f51a6 100644 --- a/proxmox-borrow/src/lib.rs +++ b/proxmox-borrow/src/lib.rs @@ -1,5 +1,7 @@ //! Helpers for borrowing and self-borrowing values. +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + use std::mem::ManuallyDrop; /// This ties two values together, so that one value can borrow from the other, while allowing the diff --git a/proxmox-client/src/lib.rs b/proxmox-client/src/lib.rs index 8161cc04..eab6cf23 100644 --- a/proxmox-client/src/lib.rs +++ b/proxmox-client/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + use std::collections::HashMap; use std::future::Future; diff --git a/proxmox-compression/src/lib.rs b/proxmox-compression/src/lib.rs index 1fcfb977..7a9837e4 100644 --- a/proxmox-compression/src/lib.rs +++ b/proxmox-compression/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + mod compression; pub use compression::*; diff --git a/proxmox-config-digest/src/lib.rs b/proxmox-config-digest/src/lib.rs index d583412a..a34a3a90 100644 --- a/proxmox-config-digest/src/lib.rs +++ b/proxmox-config-digest/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + use anyhow::{bail, Error}; #[cfg(feature = "openssl")] diff --git a/proxmox-dns-api/src/lib.rs b/proxmox-dns-api/src/lib.rs index c6cf61cb..20f10227 100644 --- a/proxmox-dns-api/src/lib.rs +++ b/proxmox-dns-api/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + mod api_types; pub use api_types::*; diff --git a/proxmox-http-error/src/lib.rs b/proxmox-http-error/src/lib.rs index b41a98c1..1468668c 100644 --- a/proxmox-http-error/src/lib.rs +++ b/proxmox-http-error/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + use std::fmt; use serde::{ser::SerializeStruct, Serialize, Serializer}; diff --git a/proxmox-http/src/lib.rs b/proxmox-http/src/lib.rs index 640bd574..4770aaf4 100644 --- a/proxmox-http/src/lib.rs +++ b/proxmox-http/src/lib.rs @@ -1,5 +1,7 @@ //! HTTP related utilities used by various Proxmox products. +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + #[cfg(feature = "websocket")] pub mod websocket; diff --git a/proxmox-human-byte/src/lib.rs b/proxmox-human-byte/src/lib.rs index 650b8374..9f728fad 100644 --- a/proxmox-human-byte/src/lib.rs +++ b/proxmox-human-byte/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + use anyhow::{bail, Error}; use proxmox_schema::{ApiStringFormat, ApiType, Schema, StringSchema, UpdaterType}; diff --git a/proxmox-io/src/lib.rs b/proxmox-io/src/lib.rs index e6cc0beb..1be005ff 100644 --- a/proxmox-io/src/lib.rs +++ b/proxmox-io/src/lib.rs @@ -4,6 +4,7 @@ //! implementing [`Read`](std::io::Read). #![deny(unsafe_op_in_unsafe_fn)] +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] mod read; pub use read::ReadExt; diff --git a/proxmox-lang/src/lib.rs b/proxmox-lang/src/lib.rs index 0f8195fe..cf191c0b 100644 --- a/proxmox-lang/src/lib.rs +++ b/proxmox-lang/src/lib.rs @@ -4,6 +4,8 @@ //! sometimes also types from nightly `std` which are simple enough to do just haven't been //! bikeshedded and stabilized in the standard library yet. +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + mod constnamedbitmap; pub mod error; diff --git a/proxmox-ldap/src/lib.rs b/proxmox-ldap/src/lib.rs index 2df7409b..ce37c778 100644 --- a/proxmox-ldap/src/lib.rs +++ b/proxmox-ldap/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + use std::{ collections::HashMap, fmt::{Display, Formatter}, diff --git a/proxmox-login/src/lib.rs b/proxmox-login/src/lib.rs index 65b875cd..5842d62a 100644 --- a/proxmox-login/src/lib.rs +++ b/proxmox-login/src/lib.rs @@ -1,6 +1,8 @@ //! This package provides helpers for logging into the APIs of Proxmox products such as Proxmox VE //! or Proxmox Backup. +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + use serde::{Deserialize, Serialize}; pub mod parse; diff --git a/proxmox-metrics/src/lib.rs b/proxmox-metrics/src/lib.rs index 000cb39c..84e7f07d 100644 --- a/proxmox-metrics/src/lib.rs +++ b/proxmox-metrics/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + use std::borrow::Cow; use std::collections::HashMap; use std::sync::Arc; diff --git a/proxmox-network-api/src/lib.rs b/proxmox-network-api/src/lib.rs index b366772d..a078ca45 100644 --- a/proxmox-network-api/src/lib.rs +++ b/proxmox-network-api/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + mod api_types; pub use api_types::*; diff --git a/proxmox-notify/src/lib.rs b/proxmox-notify/src/lib.rs index 53f897a9..910dfa06 100644 --- a/proxmox-notify/src/lib.rs +++ b/proxmox-notify/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + use std::collections::HashMap; use std::error::Error as StdError; use std::fmt::Display; diff --git a/proxmox-openid/src/lib.rs b/proxmox-openid/src/lib.rs index a65a729b..fe65fded 100644 --- a/proxmox-openid/src/lib.rs +++ b/proxmox-openid/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + use std::path::Path; use anyhow::{format_err, Error}; diff --git a/proxmox-product-config/src/lib.rs b/proxmox-product-config/src/lib.rs index c6e08e5e..9576a08d 100644 --- a/proxmox-product-config/src/lib.rs +++ b/proxmox-product-config/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + mod filesystem_helpers; pub use filesystem_helpers::*; diff --git a/proxmox-rest-server/src/lib.rs b/proxmox-rest-server/src/lib.rs index ce9e4f15..03942519 100644 --- a/proxmox-rest-server/src/lib.rs +++ b/proxmox-rest-server/src/lib.rs @@ -15,6 +15,8 @@ //! - worker task management //! * generic interface to authenticate user +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + use std::fmt; use std::os::unix::io::{FromRawFd, OwnedFd}; use std::sync::atomic::{AtomicBool, Ordering}; diff --git a/proxmox-router/src/lib.rs b/proxmox-router/src/lib.rs index 808836a8..b0b67bcb 100644 --- a/proxmox-router/src/lib.rs +++ b/proxmox-router/src/lib.rs @@ -1,5 +1,7 @@ //! API Router and Command Line Interface utilities. +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + pub mod format; #[cfg(feature = "cli")] diff --git a/proxmox-rrd/src/lib.rs b/proxmox-rrd/src/lib.rs index 65e04247..175bb877 100644 --- a/proxmox-rrd/src/lib.rs +++ b/proxmox-rrd/src/lib.rs @@ -6,6 +6,8 @@ //! * Stores data for different time resolution //! * Simple cache implementation with journal support +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + #[cfg(feature = "rrd_v1")] mod rrd_v1; diff --git a/proxmox-schema/src/lib.rs b/proxmox-schema/src/lib.rs index 09c271bf..c91b5fd6 100644 --- a/proxmox-schema/src/lib.rs +++ b/proxmox-schema/src/lib.rs @@ -7,6 +7,7 @@ //! parsers. #![deny(unsafe_op_in_unsafe_fn)] +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] #[cfg(feature = "api-macro")] pub use proxmox_api_macro::api; diff --git a/proxmox-section-config/src/lib.rs b/proxmox-section-config/src/lib.rs index e36d8995..cfa79ad4 100644 --- a/proxmox-section-config/src/lib.rs +++ b/proxmox-section-config/src/lib.rs @@ -18,6 +18,8 @@ //! ... //! ``` +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + use std::collections::HashMap; use std::collections::HashSet; use std::path::Path; diff --git a/proxmox-serde/src/lib.rs b/proxmox-serde/src/lib.rs index 2f1ccca5..dfd0915e 100644 --- a/proxmox-serde/src/lib.rs +++ b/proxmox-serde/src/lib.rs @@ -1,5 +1,7 @@ //! Serialization helpers for serde +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + #[macro_use] pub mod serde_macros; diff --git a/proxmox-shared-memory/src/lib.rs b/proxmox-shared-memory/src/lib.rs index 4809bd04..defe678d 100644 --- a/proxmox-shared-memory/src/lib.rs +++ b/proxmox-shared-memory/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + use std::ffi::{CStr, CString}; use std::fs::File; use std::mem::MaybeUninit; diff --git a/proxmox-simple-config/src/lib.rs b/proxmox-simple-config/src/lib.rs index f3b1782f..710fb53a 100644 --- a/proxmox-simple-config/src/lib.rs +++ b/proxmox-simple-config/src/lib.rs @@ -1,5 +1,7 @@ //! Our 'key: value' config format. +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + use std::io::Write; use anyhow::{bail, format_err, Error}; diff --git a/proxmox-sortable-macro/src/lib.rs b/proxmox-sortable-macro/src/lib.rs index a38f7310..1395c77c 100644 --- a/proxmox-sortable-macro/src/lib.rs +++ b/proxmox-sortable-macro/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + extern crate proc_macro; extern crate proc_macro2; diff --git a/proxmox-subscription/src/lib.rs b/proxmox-subscription/src/lib.rs index 8a298f23..bcc10721 100644 --- a/proxmox-subscription/src/lib.rs +++ b/proxmox-subscription/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + mod subscription_info; pub use subscription_info::{ get_hardware_address, ProductType, SubscriptionInfo, SubscriptionStatus, diff --git a/proxmox-sys/src/lib.rs b/proxmox-sys/src/lib.rs index 8ea70732..02fcfc59 100644 --- a/proxmox-sys/src/lib.rs +++ b/proxmox-sys/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + use std::os::unix::ffi::OsStrExt; pub mod boot_mode; diff --git a/proxmox-syslog-api/src/lib.rs b/proxmox-syslog-api/src/lib.rs index f2e026a5..4dd5565a 100644 --- a/proxmox-syslog-api/src/lib.rs +++ b/proxmox-syslog-api/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + mod api_types; pub use api_types::*; diff --git a/proxmox-tfa/src/lib.rs b/proxmox-tfa/src/lib.rs index cf7010ef..1f65508b 100644 --- a/proxmox-tfa/src/lib.rs +++ b/proxmox-tfa/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + #[cfg(feature = "u2f")] pub mod u2f; diff --git a/proxmox-time-api/src/lib.rs b/proxmox-time-api/src/lib.rs index 45b2073f..b9365ece 100644 --- a/proxmox-time-api/src/lib.rs +++ b/proxmox-time-api/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + mod api_types; pub use api_types::*; diff --git a/proxmox-time/src/lib.rs b/proxmox-time/src/lib.rs index 15ce0a01..93fe3b52 100644 --- a/proxmox-time/src/lib.rs +++ b/proxmox-time/src/lib.rs @@ -1,4 +1,5 @@ #![allow(clippy::manual_range_contains)] +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] #[cfg(not(target_arch = "wasm32"))] mod tm_editor; diff --git a/proxmox-uuid/src/lib.rs b/proxmox-uuid/src/lib.rs index 9dea3f9b..4b424c2d 100644 --- a/proxmox-uuid/src/lib.rs +++ b/proxmox-uuid/src/lib.rs @@ -1,5 +1,7 @@ //! Simple bindings to libuuid's `uuid_generate`. +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + use std::borrow::{Borrow, BorrowMut}; use std::fmt;