-
Notifications
You must be signed in to change notification settings - Fork 13.3k
"[src]" links point to the place items are defined, not to the re-export #41903
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
Comments
It seems like rustdoc is pulling the stdlib's source in instead of the crate's, but I'm not sure. |
It's getting the doc comments from std, too. |
rustdoc can only generate docs for one platform at once (#1998). I don't know what platform docs.rs uses by default but it's clearly |
Aha so I was right and it *is* a re-export.
…On Thu, May 11, 2017 at 12:10 AM, Oliver Middleton ***@***.*** > wrote:
rustdoc can only generate docs for one platform at once (#1998
<#1998>). I don't know what
platform docs.rs uses by default but it's clearly not(windows)
<https://docs.rs/remove_dir_all/0.2.0/src/remove_dir_all/lib.rs.html#10-11>.
The docs for Windows seem fine: https://docs.rs/remove_dir_
all/0.2.0/x86_64-pc-windows-msvc/remove_dir_all/fn.remove_dir_all.html.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#41903 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAC3n_NranGeEYe6QTOFz5zh3wlAKBhXks5r4oo4gaJpZM4NXbF0>
.
|
TRWTF is that rustdoc shows no indication at all that you're looking at
re-exported docs.
…On Thu, May 11, 2017 at 12:12 AM, Alex Burka ***@***.***> wrote:
Aha so I was right and it *is* a re-export.
On Thu, May 11, 2017 at 12:10 AM, Oliver Middleton <
***@***.***> wrote:
> rustdoc can only generate docs for one platform at once (#1998
> <#1998>). I don't know what
> platform docs.rs uses by default but it's clearly not(windows)
> <https://docs.rs/remove_dir_all/0.2.0/src/remove_dir_all/lib.rs.html#10-11>.
> The docs for Windows seem fine: https://docs.rs/remove_dir_all
> /0.2.0/x86_64-pc-windows-msvc/remove_dir_all/fn.remove_dir_all.html.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#41903 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AAC3n_NranGeEYe6QTOFz5zh3wlAKBhXks5r4oo4gaJpZM4NXbF0>
> .
>
|
That's probably "none of your business!" That is, the source crate is not |
Yeah, but it's jarring when a [src] link suddenly takes you to another
crate, so the facade breaks down anyway.
…On Sat, May 13, 2017 at 7:02 PM, Josh Stone ***@***.***> wrote:
TRWTF is that rustdoc shows no indication at all that you're looking at
re-exported docs.
That's probably "none of your business!" That is, the source crate is not
pub exposed, so to users of this crate the function behaves as if it
originated here. (Except you can probably test equivalence in other ways.)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#41903 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAC3n-jUW5_OTrBV1UR49F3ZYBpzxefBks5r5jZzgaJpZM4NXbF0>
.
|
If the crate just re-exports another crate, I expect to see the re-export line when I click |
Personally I would prefer not to do this - for something like |
This is the same as #22083, but for crates other than the standard library. There are three ways rustdoc could behave:
For any of those, having both this issue and #22083 open isn't correct. @rust-lang/rustdoc do you have opinions? |
I'd be more inclined to link to the reexport but otherwise no strong feeling about it... |
I don't necessarily agree that |
I think option 1 is the way to go, |
This is an excellent point. I agree [src] should go to the definition and "documentation" links should use the facade. |
https://docs.rs/remove_dir_all/0.2.0/remove_dir_all/fn.remove_dir_all.html
durka42 states that it's a bug in rustdoc and the entire doc is wrong.
The text was updated successfully, but these errors were encountered: