Skip to content

[Rust 2018] rustdoc fails completely #52143

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
CryZe opened this issue Jul 7, 2018 · 1 comment
Closed

[Rust 2018] rustdoc fails completely #52143

CryZe opened this issue Jul 7, 2018 · 1 comment
Labels
A-edition-2018 Area: The 2018 edition F-rust_2018_preview `#![feature(rust_2018_preview)]`

Comments

@CryZe
Copy link
Contributor

CryZe commented Jul 7, 2018

My base crate uses Rust 2018 and has a bunch of Rust 2015 dependencies. Running cargo doc fails to document most Rust 2015 crates:

 Documenting num-traits v0.2.4
 Documenting base64 v0.9.1
 Documenting serde v1.0.62
error: unused extern crate
 --> C:\Users\Christopher Serr\.cargo\registry\src\git.colasdn.top-1ecc6299db9ec823\base64-0.9.1\src\line_wrap.rs:1:1
  |
1 | extern crate safemem;
  | ^^^^^^^^^^^^^^^^^^^^^ help: remove it
warning: `[cfg]` cannot be resolved, ignoring it...
 --> C:\Users\Christopher Serr\.cargo\registry\src\git.colasdn.top-1ecc6299db9ec823\cfg-if-0.1.3\src\lib.rs:1:28
  |
1 | //! A macro for defining #[cfg] if-else statements.
  |                            ^^^ cannot be resolved, ignoring
  |
  |
note: lint level defined here
 --> C:\Users\Christopher Serr\.cargo\registry\src\git.colasdn.top-1ecc6299db9ec823\base64-0.9.1\src\lib.rs:59:57
  |
59|     missing_docs, trivial_casts, trivial_numeric_casts, unused_extern_crates, unused_import_braces,
  |                                                         ^^^^^^^^^^^^^^^^^^^^

  = note: #[warn(intra_doc_link_resolution_failure)] on by default
error: Compilation failed, aborting rustdoc

  = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`

warning: `[cfg]` cannot be resolved, ignoring it...
 --> C:\Users\Christopher Serr\.cargo\registry\src\git.colasdn.top-1ecc6299db9ec823\cfg-if-0.1.3\src\lib.rs:7:59
  |
7 | //! This allows you to conveniently provide a long list #[cfg]'d blocks of code
  |                                                           ^^^ cannot be resolved, ignoring
  |
  = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`

error: Could not document `base64`.

Caused by:
  process didn't exit successfully: `rustdoc --crate-name base64 C:\Users\Christopher Serr\.cargo\registry\src\git.colasdn.top-1ecc6299db9ec823\base64-0.9.1\src\lib.rs -o C:\Projekte\one-offs\LiveSplitOne\livesplit-core\target\doc -L dependency=C:\Projekte\one-offs\LiveSplitOne\livesplit-core\target\debug\deps --extern byteorder=C:\Projekte\one-offs\LiveSplitOne\livesplit-core\target\debug\deps\libbyteorder-198fa0f87c04f399.rmeta --extern safemem=C:\Projekte\one-offs\LiveSplitOne\livesplit-core\target\debug\deps\libsafemem-9af8dc15e19938f1.rmeta` (exit code: 101)
warning: build failed, waiting for other jobs to finish...
error: unused import: `SeqAccess`
  --> C:\Users\Christopher Serr\.cargo\registry\src\git.colasdn.top-1ecc6299db9ec823\serde-1.0.62\src\de\value.rs:41:44
   |
41 | use de::{self, Expected, IntoDeserializer, SeqAccess};
   |                                            ^^^^^^^^^
   |
note: lint level defined here
  --> C:\Users\Christopher Serr\.cargo\registry\src\git.colasdn.top-1ecc6299db9ec823\serde-1.0.62\src\lib.rs:126:23
   |
126| #![deny(missing_docs, unused_imports)]
   |                       ^^^^^^^^^^^^^^

error: unused import: `private::de::size_hint`
  --> C:\Users\Christopher Serr\.cargo\registry\src\git.colasdn.top-1ecc6299db9ec823\serde-1.0.62\src\de\value.rs:42:5
   |
42 | use private::de::size_hint;
   |     ^^^^^^^^^^^^^^^^^^^^^^

error: unused import: `Unexpected`
    --> C:\Users\Christopher Serr\.cargo\registry\src\git.colasdn.top-1ecc6299db9ec823\serde-1.0.62\src\de\value.rs:1274:20
     |
1274 |     use de::{self, Unexpected};
     |                    ^^^^^^^^^^

error: unused imports: `Unexpected`, `VariantAccess`
  --> C:\Users\Christopher Serr\.cargo\registry\src\git.colasdn.top-1ecc6299db9ec823\serde-1.0.62\src\de\impls.rs:12:62
   |
12 |     Deserialize, Deserializer, EnumAccess, Error, SeqAccess, Unexpected, VariantAccess, Visitor,
   |                                                              ^^^^^^^^^^  ^^^^^^^^^^^^^

error: unused import: `de::MapAccess`
  --> C:\Users\Christopher Serr\.cargo\registry\src\git.colasdn.top-1ecc6299db9ec823\serde-1.0.62\src\de\impls.rs:16:5
   |
16 | use de::MapAccess;
   |     ^^^^^^^^^^^^^

error: unused import: `de::from_primitive::FromPrimitive`
  --> C:\Users\Christopher Serr\.cargo\registry\src\git.colasdn.top-1ecc6299db9ec823\serde-1.0.62\src\de\impls.rs:18:5
   |
18 | use de::from_primitive::FromPrimitive;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: unused import: `private::de::InPlaceSeed`
  --> C:\Users\Christopher Serr\.cargo\registry\src\git.colasdn.top-1ecc6299db9ec823\serde-1.0.62\src\de\impls.rs:19:5
   |
19 | use private::de::InPlaceSeed;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^

error: unused import: `private::de::size_hint`
  --> C:\Users\Christopher Serr\.cargo\registry\src\git.colasdn.top-1ecc6299db9ec823\serde-1.0.62\src\de\impls.rs:22:5
   |
22 | use private::de::size_hint;
   |     ^^^^^^^^^^^^^^^^^^^^^^

error: unused import: `SerializeTuple`
  --> C:\Users\Christopher Serr\.cargo\registry\src\git.colasdn.top-1ecc6299db9ec823\serde-1.0.62\src\ser\impls.rs:11:22
   |
11 | use ser::{Serialize, SerializeTuple, Serializer};
   |                      ^^^^^^^^^^^^^^

error: unused import: `ser::Error`
  --> C:\Users\Christopher Serr\.cargo\registry\src\git.colasdn.top-1ecc6299db9ec823\serde-1.0.62\src\ser\impls.rs:14:5
   |
14 | use ser::Error;
   |     ^^^^^^^^^^

error: unused import: `Unexpected`
  --> C:\Users\Christopher Serr\.cargo\registry\src\git.colasdn.top-1ecc6299db9ec823\serde-1.0.62\src\private\de.rs:14:21
   |
14 | use de::{MapAccess, Unexpected};
   |                     ^^^^^^^^^^

error: unused import: `super::size_hint`
   --> C:\Users\Christopher Serr\.cargo\registry\src\git.colasdn.top-1ecc6299db9ec823\serde-1.0.62\src\private\de.rs:232:9
    |
232 |     use super::size_hint;
    |         ^^^^^^^^^^^^^^^^

error: unused import: `SerializeStruct`
  --> C:\Users\Christopher Serr\.cargo\registry\src\git.colasdn.top-1ecc6299db9ec823\serde-1.0.62\src\private\ser.rs:11:54
   |
11 | use ser::{self, Impossible, Serialize, SerializeMap, SerializeStruct, Serializer};
   |                                                      ^^^^^^^^^^^^^^^

error: unused import: `ContentSerializer`
  --> C:\Users\Christopher Serr\.cargo\registry\src\git.colasdn.top-1ecc6299db9ec823\serde-1.0.62\src\private\ser.rs:15:14
   |
15 |     Content, ContentSerializer, SerializeStructVariantAsMapValue, SerializeTupleVariantAsMapValue,
   |              ^^^^^^^^^^^^^^^^^

error: Compilation failed, aborting rustdoc

error: Could not document `serde`.
@stokhos stokhos added the F-rust_2018_preview `#![feature(rust_2018_preview)]` label Jul 8, 2018
@dtolnay
Copy link
Member

dtolnay commented Jul 21, 2018

This was a consequence of a deny(unused_imports) regression that has been fixed. See #51661.

@dtolnay dtolnay closed this as completed Jul 21, 2018
@fmease fmease added the A-edition-2018 Area: The 2018 edition label Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-edition-2018 Area: The 2018 edition F-rust_2018_preview `#![feature(rust_2018_preview)]`
Projects
None yet
Development

No branches or pull requests

4 participants