Skip to content

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

Closed

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

Activity

  1. added
    T-libs-api[DEPRECATED; DO NOT USE]
    A-libtestArea: `#[test]` / the `test` library
    C-bugCategory: This is a bug.
    on Jan 30, 2018
  2. emilyalbini commented on Jan 30, 2018

    @emilyalbini
    Member

    cc @petrochenkov, who implemented the feature in #44660

  3. added 3 commits that reference this issue on Feb 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-libtestArea: `#[test]` / the `test` libraryC-bugCategory: This is a bug.T-libs-api[DEPRECATED; DO NOT USE]

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions