Move root crate re-export docs to the root.#733
Conversation
|
huh, I didn't know about these attributes. In my ideal world, we would inline all the |
|
We can inline them in the root, but then we should hide them in the |
|
That sounds okay to me; I dislike that these types aren't included in the main list of traits. Do you see any downside? If not, would you like to give that a try instead of this solution? If not I'm happy to merge this for now and then open an issue for that other change. |
|
Sure, I'll give it a go, probably tomorrow. |
|
It's a no-go after all. So for now the best way to keep links working is to merge my original PR. |
|
but what if we do, #[doc(inline)]
pub use widget::{Widget, WidgetExt, WidgetId};is the problem that the docs can be linked from two places? because I don't think thats totally the end of the world, they'll be the same docs. |
|
Then there are two files |
|
hm, but can we just ensure that we never link to one of them? |
|
I guess not. :/ |
|
How badly do we need I'll give this a shot tomorrow and we'll see if it can be done and how it looks. |
|
sounds good. |
|
Okay, things are looking better now.
|
cmyr
left a comment
There was a problem hiding this comment.
This looks like a very clear win, thanks! Afaict this shouldn't break anything; am I understanding correctly?
| /// Wrap this widget in a [`Padding`] widget with the given [`Insets`]. | ||
| /// | ||
| /// [`Padding`]: struct.Padding.html | ||
| /// [`Insets`]: https://docs.rs/kurbo/0.5.4/kurbo/struct.Insets.html |
|
Yeah this is 99% docs orientated changes, as far as code is concerned all imports will continue to work as they did previously. The only exception could be the |
WidgetExtshows up as a regular trait in the crate root docs right now, leading to broken links. This PR forces it to work the same way asWidgetandWidgetId.