Skip to content

Commit

Permalink
docs: enable nightly-only docsrs (#76)
Browse files Browse the repository at this point in the history
See rust-lang/rust#43781. This enables infoboxes like
"Available on crate feature XXX only." in the documentation generated
using `cargo doc` on nightly, or by building on docs.rs.

This can be tested with:

```shell
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --no-deps --all-features
```
  • Loading branch information
m4tx authored Nov 22, 2024
1 parent 19aac2d commit e718f8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions flareon/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ fake.workspace = true
futures.workspace = true
mockall.workspace = true

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[package.metadata.cargo-machete]
ignored = [
# askama doesn't seem to be working with minimal versions of its dependencies at the moment,
Expand Down
1 change: 1 addition & 0 deletions flareon/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
unused_import_braces,
unused_qualifications
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]

extern crate self as flareon;

Expand Down

0 comments on commit e718f8b

Please sign in to comment.