Skip to content

extern_absolute_paths feature breaks cargo test (can't find crate for __test_reexports) #47075

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
sinkuu opened this issue Dec 30, 2017 · 1 comment
Labels
A-libtest Area: `#[test]` / the `test` library C-bug Category: This is a bug. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@sinkuu
Copy link
Contributor

sinkuu commented Dec 30, 2017

Adding feature(extern_absolute_paths) seems to break testing.

I tried this code (src/lib.rs):

#![feature(extern_absolute_paths)]

#[test]
fn test() {
}

I expected to see this happen: cargo test works successfully.

Instead, this happened: it fails with an error.

$ cargo test
   Compiling foo v0.1.0 (file:///tmp/foo)
error[E0463]: can't find crate for `__test_reexports`
 --> src/lib.rs:4:1
  |
4 | / fn test() {
5 | | }
  | |_^ can't find crate

error: aborting due to previous error

error: Could not compile `foo`.
warning: build failed, waiting for other jobs to finish...
error: build failed

Meta

`rustc --version --verbose`
rustc 1.24.0-nightly (2dad872a2 2017-12-29)
binary: rustc
commit-hash: 2dad872a2dae12b882cd73536a66c9289a2b65ae
commit-date: 2017-12-29
host: x86_64-unknown-linux-gnu
release: 1.24.0-nightly
LLVM version: 4.0
@pietroalbini pietroalbini added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. A-libtest Area: `#[test]` / the `test` library C-bug Category: This is a bug. labels Jan 30, 2018
@pietroalbini
Copy link
Member

cc @petrochenkov, who implemented the feature in #44660

Manishearth added a commit to Manishearth/rust that referenced this issue Feb 24, 2018
…ests, r=eddyb

Termination trait in tests

Support the `Termination` trait in unit tests (cc rust-lang#43301)

Also, a drive-by fix for rust-lang#47075.

This is joint work with @bkchr.
Manishearth added a commit to Manishearth/rust that referenced this issue Feb 24, 2018
…ests, r=eddyb

Termination trait in tests

Support the `Termination` trait in unit tests (cc rust-lang#43301)

Also, a drive-by fix for rust-lang#47075.

This is joint work with @bkchr.
@sinkuu sinkuu closed this as completed Mar 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-libtest Area: `#[test]` / the `test` library C-bug Category: This is a bug. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants