Skip to content

cargo doc fails for the h2 crate (v0.1.9) on nightly 2018-06-05 #51468

Closed
@jimmycuadra

Description

@jimmycuadra
Contributor
$ rustup show
Default host: x86_64-apple-darwin

installed toolchains
--------------------

stable-x86_64-apple-darwin
nightly-x86_64-apple-darwin (default)

active toolchain
----------------

nightly-x86_64-apple-darwin (default)
rustc 1.28.0-nightly (4a9c58c6b 2018-06-05)
$ cargo doc -p h2
 Documenting h2 v0.1.9
warning: [u8] cannot be resolved, ignoring it...
  --> /Users/example/.cargo/registry/src/github.tiyicn.workers.dev-1ecc6299db9ec823/bytes-0.4.8/src/lib.rs:1:1
   |
1  | / //! Provides abstractions for working with bytes.
2  | | //!
3  | | //! The `bytes` crate provides an efficient byte buffer structure
4  | | //! ([`Bytes`](struct.Bytes.html)) and traits for working with buffer
...  |
68 | | //! perform a syscall, which has the potential of failing. Operations on `Buf`
69 | | //! and `BufMut` are infallible.
   | |________________________________^
   |
   = note: the link appears in this line:

            A `Bytes` handle can be created directly from an existing byte store (such as &[u8]
                                                                                            ^^

warning: [cfg] cannot be resolved, ignoring it...
  --> /Users/example/.cargo/registry/src/github.tiyicn.workers.dev-1ecc6299db9ec823/cfg-if-0.1.3/src/lib.rs:1:1
   |
1  | / //! A macro for defining #[cfg] if-else statements.
2  | | //!
3  | | //! The macro provided by this crate, `cfg_if`, is similar to the `if/elif` C
4  | | //! preprocessor macro by allowing definition of a cascade of `#[cfg]` cases,
...  |
26 | | //! # fn main() {}
27 | | //! ```
   | |_______^
   |
   = note: the link appears in this line:

            A macro for defining #[cfg] if-else statements.
                                   ^^^

warning: [cfg] cannot be resolved, ignoring it...
  --> /Users/example/.cargo/registry/src/github.tiyicn.workers.dev-1ecc6299db9ec823/cfg-if-0.1.3/src/lib.rs:1:1
   |
1  | / //! A macro for defining #[cfg] if-else statements.
2  | | //!
3  | | //! The macro provided by this crate, `cfg_if`, is similar to the `if/elif` C
4  | | //! preprocessor macro by allowing definition of a cascade of `#[cfg]` cases,
...  |
26 | | //! # fn main() {}
27 | | //! ```
   | |_______^
   |
   = note: the link appears in this line:

            This allows you to conveniently provide a long list #[cfg]'d blocks of code
                                                                  ^^^

warning: [Debug] cannot be resolved, ignoring it...
   |
   = note: the link appears in this line:

            themselves through the [`Display`] and [`Debug`] traits, and may provide
                                                    ^^^^^^^

error[E0658]: access to extern crates through prelude is experimental (see issue #44660)
  |
  = help: add #![feature(extern_prelude)] to the crate attributes to enable

error: Could not document `h2`.

Caused by:
  process didn't exit successfully: `rustdoc --crate-name h2 /Users/example/.cargo/registry/src/github.tiyicn.workers.dev-1ecc6299db9ec823/h2-0.1.9/src/lib.rs -o /Users/example/example-cargo-project/target/doc -L dependency=/Users/example/example-cargo-project/target/debug/deps --extern byteorder=/Users/example/example-cargo-project/target/debug/deps/libbyteorder-df3eee4befa1312c.rmeta --extern bytes=/Users/example/example-cargo-project/target/debug/deps/libbytes-9fc866f4058b4096.rmeta --extern fnv=/Users/example/example-cargo-project/target/debug/deps/libfnv-2278a5d27eb0baf9.rmeta --extern futures=/Users/example/example-cargo-project/target/debug/deps/libfutures-5c1e38662d6f78e5.rmeta --extern http=/Users/example/example-cargo-project/target/debug/deps/libhttp-b2084a070c91801e.rmeta --extern indexmap=/Users/example/example-cargo-project/target/debug/deps/libindexmap-fbca607fdf3e2794.rmeta --extern log=/Users/example/example-cargo-project/target/debug/deps/liblog-1c027577d3857644.rmeta --extern slab=/Users/example/example-cargo-project/target/debug/deps/libslab-4299e706602486cd.rmeta --extern string=/Users/example/example-cargo-project/target/debug/deps/libstring-1c5b00744b69ff86.rmeta --extern tokio_io=/Users/example/example-cargo-project/target/debug/deps/libtokio_io-79182f96ea980954.rmeta` (exit code: 101)

Activity

added
T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
C-bugCategory: This is a bug.
on Jun 11, 2018
added this to the 1.28 milestone on Jun 11, 2018
pietroalbini

pietroalbini commented on Jun 11, 2018

@pietroalbini
Member

This is a regression from stable to nightly. cc @rust-lang/rustdoc

GuillaumeGomez

GuillaumeGomez commented on Jun 11, 2018

@GuillaumeGomez
Member

No it's not, it's a nightly version using a nightly feature (intra-link to exact).

removed this from the 1.28 milestone on Jun 11, 2018
QuietMisdreavus

QuietMisdreavus commented on Jun 11, 2018

@QuietMisdreavus
Member

We've been getting enough of these breaking errors out of the intra-links that i wonder if we should introduce a "rustdoc feature flag" for it. Something like #![doc(feature(type_links))]? It would help contain these errors.

The actual compile error is also a duplicate of #50561. Everything else is just warnings that lead up to that point.`

QuietMisdreavus

QuietMisdreavus commented on Jun 23, 2018

@QuietMisdreavus
Member

Good news: The compile error shown in the issue description was fixed in #50617.

Bad news: The h2 crate still can't compile on nightly, because of a #![deny(warnings)] interacting with the new intra-doc-link resolution failure lint:

$ cargo +nightly rustdoc
 Documenting h2 v0.1.10 (file:///home/misdreavus/clones/h2)
error: `[u8]` cannot be resolved, ignoring it...
  --> /home/misdreavus/.cargo/registry/src/github.tiyicn.workers.dev-1ecc6299db9ec823/bytes-0.4.8/src/lib.rs:21:85
   |
21 | //! A `Bytes` handle can be created directly from an existing byte store (such as &[u8]
   |                                                                                     ^^ cannot be resolved, ignoring
   |
note: lint level defined here
  --> src/lib.rs:88:9
   |
88 | #![deny(warnings, missing_debug_implementations, missing_docs)]
   |         ^^^^^^^^
   = note: #[deny(intra_doc_link_resolution_failure)] implied by #[deny(warnings)]
   = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`

error: Could not document `h2`.

I'm not familiar with the h2 crate; is the Bytes publicly exported? If not, then that error will go away with #51684.

20 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

    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

      No branches or pull requests

        Participants

        @kzys@jimmycuadra@rtsuk@dgrnbrg@pietroalbini

        Issue actions

          `cargo doc` fails for the h2 crate (v0.1.9) on nightly 2018-06-05 · Issue #51468 · rust-lang/rust