Book: rustdoc tests failing for 1.32.0

Created on 19 Jan 2019  路  1Comment  路  Source: rust-lang/book

Travis-CI failed the build of https://github.com/rust-lang/book/pull/1775 due to rustdoc --test generating an error on src/ch14-02-publishing-to-crates-io.md (that file wasn't touched in the PR). It looks like it is an issue with rust 1.32.0. If I run rustdoc locally with 1.31.1 the tests pass but they fail with 1.32.0:

$ rustup run 1.31.1 rustdoc --test src/ch14-02-publishing-to-crates-io.md
...
test result: ok. 1 passed; 0 failed; 5 ignored; 0 measured; 0 filtered out

$ rustup run 1.32.0 rustdoc --test src/ch14-02-publishing-to-crates-io.md

running 6 tests
test src/ch14-02-publishing-to-crates-io.md - _::Publishing_a_Crate_to_Crates_io::Exporting_a_Convenient_Public_API_with_ (line 247) ... ignored
test src/ch14-02-publishing-to-crates-io.md - _::Publishing_a_Crate_to_Crates_io::Exporting_a_Convenient_Public_API_with_ (line 278) ... ignored
test src/ch14-02-publishing-to-crates-io.md - _::Publishing_a_Crate_to_Crates_io::Exporting_a_Convenient_Public_API_with_ (line 314) ... ignored
test src/ch14-02-publishing-to-crates-io.md - _::Publishing_a_Crate_to_Crates_io::Making_Useful_Documentation_Comments (line 31) ... ignored
test src/ch14-02-publishing-to-crates-io.md - _::Publishing_a_Crate_to_Crates_io::Making_Useful_Documentation_Comments::Commenting_Contained_Items (line 127) ... ignored
test src/ch14-02-publishing-to-crates-io.md - _::Publishing_a_Crate_to_Crates_io::Exporting_a_Convenient_Public_API_with_ (line 191) ... FAILED

failures:

---- src/ch14-02-publishing-to-crates-io.md - _::Publishing_a_Crate_to_Crates_io::Exporting_a_Convenient_Public_API_with_ (line 191) stdout ----
error[E0432]: unresolved import `crate::kinds`
  --> src/ch14-02-publishing-to-crates-io.md:213:16
   |
24 |     use crate::kinds::*;
   |                ^^^^^ maybe a missing `extern crate kinds;`?

error[E0433]: failed to resolve: use of undeclared type or module `SecondaryColor`
  --> src/ch14-02-publishing-to-crates-io.md:219:9
   |
30 |         SecondaryColor::Orange
   |         ^^^^^^^^^^^^^^ use of undeclared type or module `SecondaryColor`

error[E0412]: cannot find type `PrimaryColor` in this scope
  --> src/ch14-02-publishing-to-crates-io.md:217:20
   |
28 |     pub fn mix(c1: PrimaryColor, c2: PrimaryColor) -> SecondaryColor {
   |                    ^^^^^^^^^^^^ not found in this scope

error[E0412]: cannot find type `PrimaryColor` in this scope
  --> src/ch14-02-publishing-to-crates-io.md:217:38
   |
28 |     pub fn mix(c1: PrimaryColor, c2: PrimaryColor) -> SecondaryColor {
   |                                      ^^^^^^^^^^^^ not found in this scope

error[E0412]: cannot find type `SecondaryColor` in this scope
  --> src/ch14-02-publishing-to-crates-io.md:217:55
   |
28 |     pub fn mix(c1: PrimaryColor, c2: PrimaryColor) -> SecondaryColor {
   |                                                       ^^^^^^^^^^^^^^ not found in this scope

thread 'src/ch14-02-publishing-to-crates-io.md - _::Publishing_a_Crate_to_Crates_io::Exporting_a_Convenient_Public_API_with_ (line 191)' panicked at 'couldn't compile the test', src/librustdoc/test.rs:323:13
note: Run with `RUST_BACKTRACE=1` for a backtrace.


failures:
    src/ch14-02-publishing-to-crates-io.md - _::Publishing_a_Crate_to_Crates_io::Exporting_a_Convenient_Public_API_with_ (line 191)

test result: FAILED. 0 passed; 1 failed; 5 ignored; 0 measured; 0 filtered out

Most helpful comment

Yikes. I've filed a bug in rust-lang/rust because I don't think that should be happening!

>All comments

Yikes. I've filed a bug in rust-lang/rust because I don't think that should be happening!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rafaelalvessa picture rafaelalvessa  路  5Comments

drandreaskrueger picture drandreaskrueger  路  4Comments

carols10cents picture carols10cents  路  5Comments

elahn picture elahn  路  3Comments

devimc picture devimc  路  4Comments