Skip to content
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

impl Deref for EndianSlice appears in std docs #74672

Closed
Nemo157 opened this issue Jul 23, 2020 · 5 comments · Fixed by #76571
Closed

impl Deref for EndianSlice appears in std docs #74672

Nemo157 opened this issue Jul 23, 2020 · 5 comments · Fixed by #76571
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@Nemo157
Copy link
Member

Nemo157 commented Jul 23, 2020

impl Deref for EndianSlice appears on the current nightly'sstd::ops::Deref documentation page, even though it's not part of the (public) standard libraries. This appears to be gimli::read::EndianSlice, so maybe related to #73441, cc @alexcrichton.

Noticed by @rijenkii (assuming they use the same handle here and discord, if not, sorry 😳)

@Nemo157 Nemo157 added the C-bug Category: This is a bug. label Jul 23, 2020
@jyn514 jyn514 added A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jul 23, 2020
@jyn514
Copy link
Member

jyn514 commented Jul 23, 2020

Relevant PRs (backtrace isn't really to blame here): #73771, #74534

@jyn514
Copy link
Member

jyn514 commented Jul 23, 2020

if let Some(trait_did) = associated_trait {
if let Some(stab) = cx.tcx.lookup_stability(trait_did.def_id) {
if stab.level.is_unstable() {
return;
}
}
}

Maybe this should also skip the impl if there is no 'stability' attribute?

https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/query/queries/struct.lookup_stability.html, https://doc.rust-lang.org/nightly/nightly-rustc/rustc_attr/builtin/struct.Stability.html

@jyn514
Copy link
Member

jyn514 commented Jul 23, 2020

Maybe this should also skip the impl if there is no 'stability' attribute?

This is the default for everything not in the standard library. So it seems like the standard library needs special casing here. Maybe as simple as || cx.tcx.crate_name(LOCAL_CRATE) == "core" && stab.is_none()?

@bjorn3
Copy link
Member

bjorn3 commented Jul 23, 2020

Doesn't gimli get everything marked as unstable behind the rustc_private feature gate through a rustc flag?

@tesuji
Copy link
Contributor

tesuji commented Sep 10, 2020

MCVE: https://github.com/lzutao/rustdoc-traits-bugs
It doesn't require any external deps, just dummy crates included.
The outermost crate is a fake std, realcore is fake core, gimli is fake gimli.

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Sep 12, 2020
…n514

Ignore rustc_private items from std docs

By ignoring rustc_private items for non local impl block,
this may fix rust-lang#74672 and fix rust-lang#75588 .

This might suppress rust-lang#76529 if it is simple enough for backport.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Sep 12, 2020
…n514

Ignore rustc_private items from std docs

By ignoring rustc_private items for non local impl block,
this may fix rust-lang#74672 and fix rust-lang#75588 .

This might suppress rust-lang#76529 if it is simple enough for backport.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Sep 12, 2020
…n514

Ignore rustc_private items from std docs

By ignoring rustc_private items for non local impl block,
this may fix rust-lang#74672 and fix rust-lang#75588 .

This might suppress rust-lang#76529 if it is simple enough for backport.
@bors bors closed this as completed in 356d8ad Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants