Conversation
jneem
left a comment
There was a problem hiding this comment.
Odd, I wonder if this was an intentional change in rustdoc.
I also wonder
- whether adding
doc(inline)changes things at all? (i.e. if something isdoc(inline)at the top-level anddoc(hidden)in a submodule, what happens?) - whether making it
pub(crate)in the submodule and thendoc(inline)at top-level whould have the desired effect?
But it's too late for me right now to experiment with this. Also I guess the pub(crate) variant would be a breaking change, so it isn't worth the trouble even if it works...
0c9307c to
2739383
Compare
I looked a tiny bit into the Rust changelog. I saw two entries that might be of relevance.
Not sure if one of those is the culprit, or perhaps some other (possibly undocumented) change.
It's hidden in both then.
Yeah I thought of this for a moment but decided against it because it is a breaking change. I tested it now for completeness and was greeted by this: error[E0365]: `Widget` is only public within the crate, and cannot be re-exported outside |
@cbondurant reported in #2355 that the docs for
WidgetandLensExtare missing. Indeed that is the case, as is forLens,WidgetId, andWidgetExt. I think I checked these just a month ago, and regardless I'm confident that these used to work way earlier, with no code/attribute changes since then.My best guess is that
rustdocchanged how#[doc(hidden)]is inherited. The way we use this attribute is to hide the docs in thewidgetmodule but then show them in the re-exported root module. This no longer works and the docs are hidden in the root too. Interestingly the reverse is still possible, we could hide the docs in the root but have them show up in thewidgetmodule.In this PR I decided to just have the docs visible in both the
widgetmodule and the root module. We're only talking a few traits here and they're quite fundamental.Additionally, I made two adjacent changes.
Env) show up as inline docs, not as re-exports.Fixes #2355