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

Fail to build tokio docs on nightly #56693

Closed
kpp opened this issue Dec 10, 2018 · 8 comments · Fixed by #56941
Closed

Fail to build tokio docs on nightly #56693

kpp opened this issue Dec 10, 2018 · 8 comments · Fixed by #56941
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@kpp
Copy link
Contributor

kpp commented Dec 10, 2018

/// 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

@estebank estebank added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools labels Dec 10, 2018
@estebank
Copy link
Contributor

Mentoring instructions:

Update the linked doc with the following two lines:

/// [`ErrorKind`]: enum.ErrorKind.html
/// [`Error`]: struct.Error.html

@estebank estebank added the E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. label Dec 10, 2018
@kpp
Copy link
Contributor Author

kpp commented Dec 10, 2018

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
Copy link
Contributor

euclio commented Dec 11, 2018

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

cc #51684

@estebank
Copy link
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.

@estebank estebank added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Dec 11, 2018
@brunoczim
Copy link

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

@euclio
Copy link
Contributor

euclio commented Dec 17, 2018

Minimal repro:

pub use std::io::Error;

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue Dec 21, 2018
…res, r=QuietMisdreavus

deny intra-doc link resolution failures in libstd

Fixes rust-lang#56693.

Until we land a fix for the underlying issue (rust-lang#56922), we can at least fix the failures in libstd so they don't propagate to downstream crates.
pietroalbini added a commit to pietroalbini/rust that referenced this issue Dec 21, 2018
…res, r=QuietMisdreavus

deny intra-doc link resolution failures in libstd

Fixes rust-lang#56693.

Until we land a fix for the underlying issue (rust-lang#56922), we can at least fix the failures in libstd so they don't propagate to downstream crates.
Centril added a commit to Centril/rust that referenced this issue Dec 22, 2018
…res, r=QuietMisdreavus

deny intra-doc link resolution failures in libstd

Fixes rust-lang#56693.

Until we land a fix for the underlying issue (rust-lang#56922), we can at least fix the failures in libstd so they don't propagate to downstream crates.
kennytm added a commit to kennytm/rust that referenced this issue Dec 22, 2018
…res, r=QuietMisdreavus

deny intra-doc link resolution failures in libstd

Fixes rust-lang#56693.

Until we land a fix for the underlying issue (rust-lang#56922), we can at least fix the failures in libstd so they don't propagate to downstream crates.
@kpp
Copy link
Contributor Author

kpp commented Dec 23, 2018

Still not fixed in rustc 1.33.0-nightly (2d3e909e4 2018-12-22).

@kpp
Copy link
Contributor Author

kpp commented Dec 28, 2018

Fixed <3

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 E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. 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