Closed
Description
Hi, I noticed that cargo doc
fails when documenting a project that has nix
in its dependencies (whether directly or indirectly), apparently because of "unused import" errors.
This happens with nix v0.11.0, with the latest rustup-provided nightly cargo (e2348c2db 2018-06-07).
Steps to reproduce:
$ mkdir tmp
$ cd tmp
$ cargo init
$ echo 'nix = ""' >> Cargo.toml
$ cargo doc
Updating registry `https://github.com/rust-lang/crates.io-index`
Compiling nix v0.11.0
Documenting void v1.0.2
Documenting cfg-if v0.1.4
Checking bitflags v1.0.3
Documenting libc v0.2.42
Documenting bitflags v1.0.3
(bitflags, void, libc, and cfg-if document fine while emitting a few warnings, elided here for readability)
Documenting nix v0.11.0
error: unused import: `Error`
--> /home/carado/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/nix-0.11.0/src/errno.rs:5:6
|
5 | use {Error, Result};
| ^^^^^
|
note: lint level defined here
--> /home/carado/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/nix-0.11.0/src/lib.rs:13:9
|
13| #![deny(unused)]
| ^^^^^^
= note: #[deny(unused_imports)] implied by #[deny(unused)]
error: unused import: `sys::utsname::uname`
--> /home/carado/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/nix-0.11.0/src/features.rs:6:9
|
6 | use sys::utsname::uname;
| ^^^^^^^^^^^^^^^^^^^
error: unused import: `Error`
--> /home/carado/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/nix-0.11.0/src/fcntl.rs:1:6
|
1 | use {Error, Result, NixPath};
| ^^^^^
(and more "error: unused import" errors)
(full log available here)
Thanks for you time.
Metadata
Metadata
Assignees
Labels
No labels