Skip to content

custom ice message test fails inside rustc repo due to wrong file path #4872

Closed
@matthiaskrgr

Description

@matthiaskrgr

#4588
The problem is that the test expects the output
thread 'rustc' panicked at 'Testing the ICE message', clippy_lints/src/utils/internal_lints.rs

but when running clippy tests from inside the rustc repo, the source path will read
src/tools/clippy/clippy_lints/src/utils/internal_lints.rs which will fail the test:

diff of stderr:

-thread 'rustc' panicked at 'Testing the ICE message', clippy_lints/src/utils/internal_lints.rs
+thread 'rustc' panicked at 'Testing the ICE message', src/tools/clippy/clippy_lints/src/utils/internal_lints.rs
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

 error: internal compiler error: unexpected panic

 note: the compiler unexpectedly panicked. this is a bug.

 note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new

 note: Clippy version: foo

cc @phansch

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingL-testsLint: Lints test code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions