Skip to content

--remap-path-prefix no longer works for compiler messages #87745

Closed
@nicholasbishop

Description

@nicholasbishop

Code

Create a directory and put a Rust file with bad syntax in it:

mkdir src
echo bad > src/test.rs

Then compile it with:

rustc --remap-path-prefix=src=MODIFIED src/test.rs

I expected to see output like this:

error: expected one of `!` or `::`, found `<eof>`
 --> MODIFIED/test.rs:1:1
[snip]

Instead, the path is not modified and I get:

error: expected one of `!` or `::`, found `<eof>`
 --> src/test.rs:1:1
[snip]

Version it worked on

rustc 1.53.0 (53cb7b0 2021-06-17)

Version with regression

rustc 1.54.0 (a178d03 2021-07-26)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.P-mediumMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions