Skip to content

Commit

Permalink
docs(toml): display feature guarded items on docs.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede committed Jan 30, 2023
1 parent 2d728d4 commit f2e6c0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/toml/Cargo.toml
Expand Up @@ -35,6 +35,9 @@ pre-release-replacements = [
{file="CHANGELOG.md", search="<!-- next-url -->", replace="<!-- next-url -->\n[Unreleased]: https://github.com/toml-rs/toml/compare/{{tag_name}}...HEAD", exactly=1},
]

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

[features]
default = ["parse", "display"]
parse = ["dep:toml_edit"]
Expand Down
1 change: 1 addition & 0 deletions crates/toml/src/lib.rs
Expand Up @@ -147,6 +147,7 @@
// and lets them ensure that there is indeed no unsafe code as opposed to
// something they couldn't detect (e.g. unsafe added via macro expansion, etc).
#![forbid(unsafe_code)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]

pub mod map;
pub mod value;
Expand Down

0 comments on commit f2e6c0e

Please sign in to comment.