Skip to content

Commit c0654ac

Browse files
committed
Improve docs on the const fn API
I randomly stumbled upon it and realised that it's not that clear.
1 parent 11f33ec commit c0654ac

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,11 @@
6262
//! over `T: BitFlag`, you will be met with an error explaining that currently,
6363
//! the only allowed trait bound for a `const fn` is `?Sized`. You will probably
6464
//! want to write a separate implementation for `BitFlags<T, u8>`,
65-
//! `BitFlags<T, u16>`, etc — probably generated by a macro.
66-
//! This strategy is often used by `enumflags2` itself; to avoid clutter, only
67-
//! one of the copies is shown in the documentation.
65+
//! `BitFlags<T, u16>`, etc — best accomplished by a simple macro.
66+
//!
67+
//! **Documentation considerations:** The strategy described above is often used
68+
//! by `enumflags2` itself. To avoid clutter in the auto-generated documentation,
69+
//! the implementations for widths other than `u8` are marked with `#[doc(hidden)]`.
6870
//!
6971
//! ## Customizing `Default`
7072
//!

0 commit comments

Comments
 (0)