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

[regression] 1.52 and 1.53 link to recursive methods in the sidebar, but those methods are not documented #85037

Closed
jyn514 opened this issue May 7, 2021 · 3 comments · Fixed by #86322
Labels
C-bug Category: This is a bug. regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Milestone

Comments

@jyn514
Copy link
Member

jyn514 commented May 7, 2021

Code

I don't have time to make an MCVE right now.

Stable and beta: image

Nightly and 1.51:
image

1.50:
image

Either the methods should be documented, or they shouldn't be linked to.

cc @pnkfelix I suspect this is regression from the backports of #84867.

@jyn514 jyn514 added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. regression-from-stable-to-beta Performance or correctness regression from stable to beta. regression-from-stable-to-stable Performance or correctness regression from one stable version to another. C-bug Category: This is a bug. labels May 7, 2021
@jyn514 jyn514 added this to the 1.52.0 milestone May 7, 2021
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label May 7, 2021
@Stupremee
Copy link
Member

Stupremee commented May 14, 2021

First of all, here's an MVCE:

use std::ops::Deref;

pub struct A {}
impl A { pub fn foo_a(&self) {} }

pub struct B {}
impl B { pub fn foo_b(&self) {} }

pub struct C {}
impl C { pub fn foo_c(&self) {} }

impl Deref for A {
    type Target = B;
    fn deref(&self) -> &B { todo!() }
}

impl Deref for B {
    type Target = C;
    fn deref(&self) -> &C { todo!() }
}

Second, what should the correct behavior be? Since you marked this as a regression, I guess the version in 1.50 is "correct"?
Nevermind, I see this is getting discussed in #84867

nars1 pushed a commit to YottaDB/YDBRust that referenced this issue Jun 9, 2021
This avoids the following error:

```
Found invalid urls in struct.KeyContext.html:
Fragment #method.is_empty at struct.KeyContext.html does not exist!
Fragment #method.capacity at struct.KeyContext.html does not exist!
Fragment #method.len at struct.KeyContext.html does not exist!
Fragment #method.as_slice at struct.KeyContext.html does not exist!
Fragment #method.allocator at struct.KeyContext.html does not exist!
Fragment #method.as_ptr at struct.KeyContext.html does not exist!
```

This is a bug in rustdoc introduced in 1.52.0: rust-lang/rust#85037. This pins the version of
rust to 1.51.0 temporarily when documenting. It still uses the latest
stable version when building and testing the crate.
@pietroalbini pietroalbini removed the regression-from-stable-to-beta Performance or correctness regression from stable to beta. label Jun 14, 2021
@pietroalbini
Copy link
Member

Removed regression-from-stable-to-beta, this is not a 1.53 regression.

@jyn514
Copy link
Member Author

jyn514 commented Jun 14, 2021

@pietroalbini sure, then it's a stable-to-stable regression then. It first regressed in 1.52.

bors added a commit to rust-lang-ci/rust that referenced this issue Jun 18, 2021
…cursive-deref, r=jyn514

fix rustdoc stack overflow on mutually recursive Deref

fix rust-lang#85095
fix rust-lang#85037
@bors bors closed this as completed in 2d76d44 Jun 18, 2021
@apiraino apiraino removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. regression-from-stable-to-stable Performance or correctness regression from one stable version to another. 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.

5 participants