Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings from Rust 1.80 by rely on docsrs --cfg provided by docs.rs #747

Merged
merged 1 commit into from
May 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,6 @@ serialize = ["serde"] # "dep:" prefix only avalible from Rust 1.60
[package.metadata.docs.rs]
# document all features
all-features = true
# defines the configuration attribute `docs_rs` to enable feature requirements
# See https://stackoverflow.com/questions/61417452
rustdoc-args = ["--cfg", "docs_rs"]

# Tests, benchmarks and examples doesn't included in package on crates.io,
# so we need to specify a path, otherwise `cargo package` complains
Expand Down
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
#![recursion_limit = "1024"]
// Enable feature requirements in the docs from 1.57
// See https://stackoverflow.com/questions/61417452
#![cfg_attr(docs_rs, feature(doc_auto_cfg))]
// docs.rs defines `docsrs` when building documentation
#![cfg_attr(docsrs, feature(doc_auto_cfg))]

#[cfg(feature = "serialize")]
pub mod de;
Expand Down