Skip to content

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

Closed
@sinkuu

Description

@sinkuu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-libtestArea: `#[test]` / the `test` libraryC-bugCategory: This is a bug.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions