jamesmunns / postcard

A no_std + serde compatible message library for Rust
Apache License 2.0
788 stars 76 forks source link

Fix documentation lints #152

Closed ia0 closed 2 months ago

netlify[bot] commented 2 months ago

Deploy Preview for cute-starship-2d9c9b canceled.

Name Link
Latest commit 8b64a7d4888a331b6f7fe745beb352f25654c137
Latest deploy log https://app.netlify.com/sites/cute-starship-2d9c9b/deploys/66423c584fc98a0008007ab6
ia0 commented 2 months ago

This actually depends on #150 to pass CI.

jamesmunns commented 2 months ago

CC @ia0, I'm not actually sure what the failing line is supposed to do, it was introduced in https://github.com/jamesmunns/postcard/pull/108 by @dtolnay, it's possible this is only intended to be activated in docs-rs with a nightly build, if so should we avoid activating this in CI?

jamesmunns commented 2 months ago

This is the failing line btw, it is complaining about the use of #![feature(...)] on stable:

https://github.com/jamesmunns/postcard/blob/b7f67b01de0a8a042d65d85841958f66b6b547b6/src/lib.rs#L4

ia0 commented 2 months ago

The last commit should fix it. We should indeed only test the documentation in nightly. Also regarding the doc_cfg feature, we could probably simplify the code by using auto_doc_cfg instead. This could be done in another PR (after #151).