tree-wide: enable doc_cfg and doc_auto_cfg for docs

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2024-07-02 11:56:53 +02:00
parent 635c8bcbed
commit 0652d81977
40 changed files with 75 additions and 0 deletions

View File

@ -1,3 +1,5 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
pub mod types; pub mod types;
#[cfg(feature = "impl")] #[cfg(feature = "impl")]

View File

@ -1,4 +1,6 @@
//! ACME API crate (API types and API implementation) //! ACME API crate (API types and API implementation)
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
mod types; mod types;
pub use types::*; pub use types::*;

View File

@ -12,6 +12,7 @@
//! The [`Account`] helper supports RSA and ECC keys and provides most of the API methods. //! The [`Account`] helper supports RSA and ECC keys and provides most of the API methods.
#![deny(missing_docs)] #![deny(missing_docs)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#[cfg(feature = "api-types")] #[cfg(feature = "api-types")]
pub mod types; pub mod types;

View File

@ -1,4 +1,5 @@
#![recursion_limit = "256"] #![recursion_limit = "256"]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
extern crate proc_macro; extern crate proc_macro;
extern crate proc_macro2; extern crate proc_macro2;

View File

@ -1,3 +1,5 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
pub mod config; pub mod config;
pub mod deb822; pub mod deb822;
pub mod repositories; pub mod repositories;

View File

@ -1,3 +1,5 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
pub mod blocking; pub mod blocking;
pub mod broadcast_future; pub mod broadcast_future;
pub mod io; pub mod io;

View File

@ -7,6 +7,8 @@
//! //!
//! The `pam-authenticator` feature enables the `Pam` type. //! 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 pub const TICKET_LIFETIME: i64 = 3600 * 2; // 2 hours
#[cfg(feature = "ticket")] #[cfg(feature = "ticket")]

View File

@ -1,5 +1,7 @@
//! Helpers for borrowing and self-borrowing values. //! Helpers for borrowing and self-borrowing values.
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
use std::mem::ManuallyDrop; use std::mem::ManuallyDrop;
/// This ties two values together, so that one value can borrow from the other, while allowing the /// This ties two values together, so that one value can borrow from the other, while allowing the

View File

@ -1,3 +1,5 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
use std::collections::HashMap; use std::collections::HashMap;
use std::future::Future; use std::future::Future;

View File

@ -1,3 +1,5 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
mod compression; mod compression;
pub use compression::*; pub use compression::*;

View File

@ -1,3 +1,5 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
use anyhow::{bail, Error}; use anyhow::{bail, Error};
#[cfg(feature = "openssl")] #[cfg(feature = "openssl")]

View File

@ -1,3 +1,5 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
mod api_types; mod api_types;
pub use api_types::*; pub use api_types::*;

View File

@ -1,3 +1,5 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
use std::fmt; use std::fmt;
use serde::{ser::SerializeStruct, Serialize, Serializer}; use serde::{ser::SerializeStruct, Serialize, Serializer};

View File

@ -1,5 +1,7 @@
//! HTTP related utilities used by various Proxmox products. //! HTTP related utilities used by various Proxmox products.
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#[cfg(feature = "websocket")] #[cfg(feature = "websocket")]
pub mod websocket; pub mod websocket;

View File

@ -1,3 +1,5 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
use anyhow::{bail, Error}; use anyhow::{bail, Error};
use proxmox_schema::{ApiStringFormat, ApiType, Schema, StringSchema, UpdaterType}; use proxmox_schema::{ApiStringFormat, ApiType, Schema, StringSchema, UpdaterType};

View File

@ -4,6 +4,7 @@
//! implementing [`Read`](std::io::Read). //! implementing [`Read`](std::io::Read).
#![deny(unsafe_op_in_unsafe_fn)] #![deny(unsafe_op_in_unsafe_fn)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
mod read; mod read;
pub use read::ReadExt; pub use read::ReadExt;

View File

@ -4,6 +4,8 @@
//! sometimes also types from nightly `std` which are simple enough to do just haven't been //! sometimes also types from nightly `std` which are simple enough to do just haven't been
//! bikeshedded and stabilized in the standard library yet. //! bikeshedded and stabilized in the standard library yet.
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
mod constnamedbitmap; mod constnamedbitmap;
pub mod error; pub mod error;

View File

@ -1,3 +1,5 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
use std::{ use std::{
collections::HashMap, collections::HashMap,
fmt::{Display, Formatter}, fmt::{Display, Formatter},

View File

@ -1,6 +1,8 @@
//! This package provides helpers for logging into the APIs of Proxmox products such as Proxmox VE //! This package provides helpers for logging into the APIs of Proxmox products such as Proxmox VE
//! or Proxmox Backup. //! or Proxmox Backup.
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
pub mod parse; pub mod parse;

View File

@ -1,3 +1,5 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
use std::borrow::Cow; use std::borrow::Cow;
use std::collections::HashMap; use std::collections::HashMap;
use std::sync::Arc; use std::sync::Arc;

View File

@ -1,3 +1,5 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
mod api_types; mod api_types;
pub use api_types::*; pub use api_types::*;

View File

@ -1,3 +1,5 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
use std::collections::HashMap; use std::collections::HashMap;
use std::error::Error as StdError; use std::error::Error as StdError;
use std::fmt::Display; use std::fmt::Display;

View File

@ -1,3 +1,5 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
use std::path::Path; use std::path::Path;
use anyhow::{format_err, Error}; use anyhow::{format_err, Error};

View File

@ -1,3 +1,5 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
mod filesystem_helpers; mod filesystem_helpers;
pub use filesystem_helpers::*; pub use filesystem_helpers::*;

View File

@ -15,6 +15,8 @@
//! - worker task management //! - worker task management
//! * generic interface to authenticate user //! * generic interface to authenticate user
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
use std::fmt; use std::fmt;
use std::os::unix::io::{FromRawFd, OwnedFd}; use std::os::unix::io::{FromRawFd, OwnedFd};
use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::atomic::{AtomicBool, Ordering};

View File

@ -1,5 +1,7 @@
//! API Router and Command Line Interface utilities. //! API Router and Command Line Interface utilities.
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
pub mod format; pub mod format;
#[cfg(feature = "cli")] #[cfg(feature = "cli")]

View File

@ -6,6 +6,8 @@
//! * Stores data for different time resolution //! * Stores data for different time resolution
//! * Simple cache implementation with journal support //! * Simple cache implementation with journal support
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#[cfg(feature = "rrd_v1")] #[cfg(feature = "rrd_v1")]
mod rrd_v1; mod rrd_v1;

View File

@ -7,6 +7,7 @@
//! parsers. //! parsers.
#![deny(unsafe_op_in_unsafe_fn)] #![deny(unsafe_op_in_unsafe_fn)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#[cfg(feature = "api-macro")] #[cfg(feature = "api-macro")]
pub use proxmox_api_macro::api; pub use proxmox_api_macro::api;

View File

@ -18,6 +18,8 @@
//! ... //! ...
//! ``` //! ```
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
use std::collections::HashMap; use std::collections::HashMap;
use std::collections::HashSet; use std::collections::HashSet;
use std::path::Path; use std::path::Path;

View File

@ -1,5 +1,7 @@
//! Serialization helpers for serde //! Serialization helpers for serde
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#[macro_use] #[macro_use]
pub mod serde_macros; pub mod serde_macros;

View File

@ -1,3 +1,5 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
use std::ffi::{CStr, CString}; use std::ffi::{CStr, CString};
use std::fs::File; use std::fs::File;
use std::mem::MaybeUninit; use std::mem::MaybeUninit;

View File

@ -1,5 +1,7 @@
//! Our 'key: value' config format. //! Our 'key: value' config format.
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
use std::io::Write; use std::io::Write;
use anyhow::{bail, format_err, Error}; use anyhow::{bail, format_err, Error};

View File

@ -1,3 +1,5 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
extern crate proc_macro; extern crate proc_macro;
extern crate proc_macro2; extern crate proc_macro2;

View File

@ -1,3 +1,5 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
mod subscription_info; mod subscription_info;
pub use subscription_info::{ pub use subscription_info::{
get_hardware_address, ProductType, SubscriptionInfo, SubscriptionStatus, get_hardware_address, ProductType, SubscriptionInfo, SubscriptionStatus,

View File

@ -1,3 +1,5 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
use std::os::unix::ffi::OsStrExt; use std::os::unix::ffi::OsStrExt;
pub mod boot_mode; pub mod boot_mode;

View File

@ -1,3 +1,5 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
mod api_types; mod api_types;
pub use api_types::*; pub use api_types::*;

View File

@ -1,3 +1,5 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#[cfg(feature = "u2f")] #[cfg(feature = "u2f")]
pub mod u2f; pub mod u2f;

View File

@ -1,3 +1,5 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
mod api_types; mod api_types;
pub use api_types::*; pub use api_types::*;

View File

@ -1,4 +1,5 @@
#![allow(clippy::manual_range_contains)] #![allow(clippy::manual_range_contains)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#[cfg(not(target_arch = "wasm32"))] #[cfg(not(target_arch = "wasm32"))]
mod tm_editor; mod tm_editor;

View File

@ -1,5 +1,7 @@
//! Simple bindings to libuuid's `uuid_generate`. //! Simple bindings to libuuid's `uuid_generate`.
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
use std::borrow::{Borrow, BorrowMut}; use std::borrow::{Borrow, BorrowMut};
use std::fmt; use std::fmt;