-
Notifications
You must be signed in to change notification settings - Fork 407
Generate docs with features for docs.rs #1303
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
Generate docs with features for docs.rs #1303
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1303 +/- ##
=======================================
Coverage 90.51% 90.52%
=======================================
Files 72 72
Lines 39608 39608
=======================================
+ Hits 35853 35854 +1
+ Misses 3755 3754 -1
Continue to review full report at Codecov.
|
lightning/src/ln/msgs.rs
Outdated
@@ -985,7 +985,7 @@ impl fmt::Display for DecodeError { | |||
DecodeError::InvalidValue => f.write_str("Nonsense bytes didn't map to the type they were interpreted as"), | |||
DecodeError::ShortRead => f.write_str("Packet extended beyond the provided bytes"), | |||
DecodeError::BadLengthDescriptor => f.write_str("A length descriptor in the packet didn't describe the later data correctly"), | |||
DecodeError::Io(ref e) => e.fmt(f), | |||
DecodeError::Io(ref e) => Debug::fmt(&e, f), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also changed in #1301, let's not conflict.
@@ -246,7 +246,6 @@ type ConfiguredTime = time::Eternity; | |||
/// [`Score`] implementation. | |||
/// | |||
/// (C-not exported) generally all users should use the [`Scorer`] type alias. | |||
#[doc(hidden)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we removing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See commit message. Type alias docs don't show any methods and you can't click on the underlying type without removing this.
Needs rebase after #1301 landed, otherwise ACK. |
The docs were hidden since a type alias should be used. However, the alias docs don't contain much useful information and don't link to the corresponding struct.
Enable generating docs using --all-features or --features="std" where applicable. Additionally, use doc_auto_cfg to tag items requiring a feature. https://doc.rust-lang.org/nightly/rustdoc/unstable-features.html#doc_auto_cfg-automatically-generate-doccfg This requires building with nightly, which is what is used by docs.rs. https://docs.rs/about/builds To test locally, use: RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc ...
8653104
to
62b1e01
Compare
Enable generating docs using
--all-features
or--features="std"
where applicable. Additionally, usedoc_auto_cfg
to tag items requiring a feature.https://doc.rust-lang.org/nightly/rustdoc/unstable-features.html#doc_auto_cfg-automatically-generate-doccfg
This requires building with
nightly
, which is what is used by docs.rs.https://docs.rs/about/builds
To test locally, use:
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc ...