Skip to content

rustdoc: redundant where 'env: 'env #58737

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

Closed
ghost opened this issue Feb 25, 2019 · 3 comments · Fixed by #58894
Closed

rustdoc: redundant where 'env: 'env #58737

ghost opened this issue Feb 25, 2019 · 3 comments · Fixed by #58894
Assignees
Labels
C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@ghost
Copy link

ghost commented Feb 25, 2019

Source: https://docs.rs/crossbeam/0.7.1/crossbeam/thread/struct.Scope.html

Generated by rustdoc:

pub struct Scope<'env>
where
    'env: 'env,
 { /* fields omitted */ }

Original code:

pub struct Scope<'env> {
    handles: SharedVec<SharedOption<thread::JoinHandle<()>>>,
    wait_group: WaitGroup,
    _marker: PhantomData<&'env mut &'env ()>,
}

Rustdoc has somehow inferred the 'env: 'env bound, which is a tautology.

@jonas-schievink jonas-schievink added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Feb 25, 2019
@GuillaumeGomez GuillaumeGomez self-assigned this Mar 3, 2019
Centril added a commit to Centril/rust that referenced this issue Apr 5, 2019
…nds, r=estebank

Fix invalid bounds string generation in rustdoc

Fixes rust-lang#58737.

Very weird and I'm not sure this is the best fix around. However, trying to fix it beforehand seems overly complicated compared to the gain (in `clean`, it wouldn't change anything since we **have to** return something so that wouldn't work, and in `hir`, I'm afraid I'd break something else for very little gain).

Also, I wasn't able to make a small code to reproduce the issue. The only way to test is to document `crossbeam` directly and check the `Scope` struct...

r? @QuietMisdreavus
@ollie27
Copy link
Member

ollie27 commented Apr 7, 2019

This needs to be reopened because #58894 didn't actually fix this. An example from std is https://doc.rust-lang.org/nightly/std/fmt/struct.Arguments.html
image

@GuillaumeGomez GuillaumeGomez reopened this Apr 8, 2019
@jyn514
Copy link
Member

jyn514 commented Aug 25, 2020

This is no longer present for Arguments on nightly ... can someone come up with an MVCE?

@jyn514 jyn514 added the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label Aug 25, 2020
@jyn514
Copy link
Member

jyn514 commented Dec 16, 2020

Since Arguments is fixed on master and Scope works as well, I'm going to close this. Feel free to reopen if you find somewhere else this bug appears.

@jyn514 jyn514 closed this as completed Dec 16, 2020
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. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example 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