Fix docs for no feature flag and added ci check

This commit is contained in:
withjannisNLnetLabs
2026-06-02 10:54:48 +02:00
parent dd149a0c81
commit a45555e11a
3 changed files with 21 additions and 10 deletions
+9 -2
View File
@@ -104,8 +104,15 @@ jobs:
cache: false
# Do the actual formatting check.
# `-D warnings` promotes all warnings to errors which leads to failure
- name: Build documentation for validation
# `-D warnings` promotes all warnings to errors which leads to failure.
# No features explicitly enabled.
- name: Build documentation for validation (no feature flag)
run: |
RUSTDOCFLAGS="-D warnings" \
cargo doc --no-deps
# All features enabled.
- name: Build documentation for validation (--all-features)
run: |
RUSTDOCFLAGS="-D warnings" \
cargo doc --no-deps --all-features
+3 -2
View File
@@ -170,11 +170,12 @@ impl<Octs> Name<Octs> {
/// This function will work for any kind octets sequence that can be
/// created from an octets slice. Since this will require providing the
/// type parameter in some cases, there are shortcuts methods for specific
/// octets types: [`root_ref`], [`root_vec`], and [`root_bytes`].
/// octets types: [`root_ref`], [`root_vec`], and
#[cfg_attr(feature = "bytes", doc = " [`root_bytes`][Name::root_bytes].")]
#[cfg_attr(not(feature = "bytes"), doc = " `root_bytes`.")]
///
/// [`root_ref`]: Name::root_ref
/// [`root_vec`]: Name::root_vec
/// [`root_bytes`]: Name::root_bytes
#[must_use]
pub fn root() -> Self
where
+9 -6
View File
@@ -5,11 +5,14 @@
//! relatively good support for DSTs (e.g. they can be held by reference like
//! any other type), it has some rough edges. The standard library tries to
//! paper over these with helpful functions and trait impls, but it does not
//! account for custom DST types. In particular, [`new::base`] introduces a
//! large number of user-facing DSTs and needs to paper over the same rough
//! edges for all of them.
//!
//! [`new::base`]: crate::new::base
//! account for custom DST types. In particular,
#![cfg_attr(
feature = "unstable-new",
doc = " [`new::base`][crate::new::base]"
)]
#![cfg_attr(not(feature = "unstable-new"), doc = " `new::base`")]
//! introduces a large number of user-facing DSTs and needs to paper over the
//! same rough edges for all of them.
//!
//! ## Coping DSTs
//!
@@ -18,7 +21,7 @@
//! Copying a DST into new container (e.g. [`Box`]) requires explicit support
//! from that container type.
//!
//! [`Box`]: https://doc.rust-lang.org/std/boxed/struct.Box.html
//! [`Box`]: std::boxed::Box
//!
//! This module introduces the [`UnsizedCopy`] trait (and a derive macro) that
//! types like [`str`] implement. Container types that can support copying