Skip to content

Fail to build tokio docs on nightly #56693

Closed
@kpp

Description

@kpp
Contributor

/// Converts an [`ErrorKind`] into an [`Error`].

This error lives on nightly for ages:

$ rustc -Vv
rustc 1.32.0-nightly (4a45578bc 2018-12-07)
binary: rustc
commit-hash: 4a45578bc58ff262864f72680cc02e83f5d2f5b3
commit-date: 2018-12-07
host: x86_64-unknown-linux-gnu
release: 1.32.0-nightly
LLVM version: 8.0
~/tokio$ cargo doc
 Documenting tokio v0.1.13 (/home/humbug/tokio)
error: `[ErrorKind]` cannot be resolved, ignoring it...
    |
note: lint level defined here
   --> src/lib.rs:2:23
    |
2   | #![deny(missing_docs, warnings, missing_debug_implementations)]
    |                       ^^^^^^^^
    = note: #[deny(intra_doc_link_resolution_failure)] implied by #[deny(warnings)]
    = note: the link appears in this line:
            
             Converts an [`ErrorKind`] into an [`Error`].
                          ^^^^^^^^^^^
    = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`

error: `[Error]` cannot be resolved, ignoring it...
    |
    = note: the link appears in this line:
            
             Converts an [`ErrorKind`] into an [`Error`].
                                                ^^^^^^^
    = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`

error: Could not document `tokio`.

Caused by:
  process didn't exit successfully: `rustdoc --crate-name tokio src/lib.rs --color always -o ..............

I am not sure this is an std::io::Error error, but it looks very strange there is no any link to FILE:LINE.

The source code can be found at tokio-rs/tokio#792

Activity

added
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and tools
on Dec 10, 2018
estebank

estebank commented on Dec 10, 2018

@estebank
Contributor

Mentoring instructions:

Update the linked doc with the following two lines:

/// [`ErrorKind`]: enum.ErrorKind.html
/// [`Error`]: struct.Error.html
added
E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
on Dec 10, 2018
kpp

kpp commented on Dec 10, 2018

@kpp
ContributorAuthor

Update the linked doc with the following two lines:

Hold on. The bug would be found in 10 seconds if you provided FILE:LINE. So the issue is a little bit more complicated.

euclio

euclio commented on Dec 11, 2018

@euclio
Contributor

Shouldn't this warning be capped when documenting tokio since it occurs in the standard library?

cc #51684

estebank

estebank commented on Dec 11, 2018

@estebank
Contributor

@euclio that would be my expectation. I am not sure why that isn't the case here.

@kpp I meant the link you provided:

/// Converts an [`ErrorKind`] into an [`Error`].

Adding the mentioned lines at the end of it should be enough to get around the current tokio problem, but a more general solution needs to be devised, as brought up by @euclio.

added
T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
on Dec 11, 2018
brunoczim

brunoczim commented on Dec 11, 2018

@brunoczim

This is why #[deny(warnings)] is a really bad idea.

euclio

euclio commented on Dec 17, 2018

@euclio
Contributor

Minimal repro:

pub use std::io::Error;
added a commit that references this issue on Dec 21, 2018

Rollup merge of rust-lang#56941 - euclio:deny-libstd-resolution-failu…

570a2ce
added a commit that references this issue on Dec 21, 2018

Rollup merge of rust-lang#56941 - euclio:deny-libstd-resolution-failu…

652e138

7 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @kpp@euclio@estebank@brunoczim

      Issue actions

        Fail to build tokio docs on nightly · Issue #56693 · rust-lang/rust