Skip to content

[testing infra] Pretty-printing tests fail when need to find an out-of-line module #37195

Open
@petrochenkov

Description

@petrochenkov

Example, run-pass\mod_file_with_path_attr.rs:

#[path = "mod_file_aux.rs"] // <- can't find this file when compiling pretty-printing tests
mod m;

pub fn main() {
    assert_eq!(m::foo(), 10);
}

Test runner needs to somehow provide a source directory when compiling tests, so out-of-line modules could be successfully resolved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-prettyArea: Pretty printing (including `-Z unpretty`)A-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions