Omit version constraints if the surrounding scope already guards these #1080
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Originally committed and discussed in #991 (comment) / #991 (comment), these patches can finally be submitted as
rustdoc
automatically propagates feature requirements on modules to the items within it, showing it conveniently on the top of the page without a singledoc(cfg())
residing inside this file anymore:Note that rustdoc automatically coalesces to this already! This PR just cleans up the code so that it's easier to read through: a loose
#[cfg]
statement makes it seem like something special is going on, even though it is simply repeating what is already declared on themod
as a whole. See: https://github.com/MarijnS95/gtk-rs/compare/deduplicate-cfg-guardsUnfortunately a bug with publicly reexporting private modules (ie. our
mod auto; pub use crate::auto::*;
) preventsrustdoc
from figuring out this type constraint onstruct
s, and instead opts to propagate the requirement to each and every member :( (#1079):That is already the case on
master
(see it for yourself!) and this PR does nothing to alleviate the situation.