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

Renamed dependencies don't appear to be available when compiling doc-tests #5792

Closed
Nemo157 opened this issue Jul 25, 2018 · 1 comment · Fixed by #5794
Closed

Renamed dependencies don't appear to be available when compiling doc-tests #5792

Nemo157 opened this issue Jul 25, 2018 · 1 comment · Fixed by #5794

Comments

@Nemo157
Copy link
Member

Nemo157 commented Jul 25, 2018

Setup

Cargo.toml

cargo-features = ["edition", "rename-dependency"]

[package]
name = "rename-test"
edition = "2018"
version = "0.1.0"

[dependencies]
old_futures = { package = "futures", version = "0.1" }

src/lib.rs

pub use old_futures::Future;

Error

→ cargo +nightly test
   Compiling rename-test v0.1.0 (file:///home/wim/sources/rename-test)
    Finished dev [unoptimized + debuginfo] target(s) in 0.41s
     Running target/debug/deps/rename_test-4457732684cc54fc

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

   Doc-tests rename-test
error[E0463]: can't find crate for `old_futures`
 --> /home/wim/sources/rename-test/src/lib.rs:1:9
  |
1 | pub use old_futures::Future;
  |         ^^^^^^^^^^^ can't find crate

error: test failed, to rerun pass '--doc'

Versions

→ cargo +nightly --version
cargo 1.29.0-nightly (506eea76e 2018-07-17)

→ rustc +nightly --version
rustc 1.29.0-nightly (6a1c0637c 2018-07-23)

(CC #5653)

@Nemo157
Copy link
Member Author

Nemo157 commented Jul 25, 2018

Looking into the verbose output I see --extern old_futures=<rlib> when doing the normal build, but --extern futures=<rlib> when calling rustdoc.

bors pushed a commit that referenced this issue Jul 26, 2018
bors added a commit that referenced this issue Jul 26, 2018
Apply dependency renamings when running rustdoc

Fixes #5792
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant