about summary refs log tree commit diff
path: root/tests/ui/errors/remap-path-prefix-reverse.rs
blob: 28fdabb8f4df1fbe98d10bcb326f3b1934aa1d60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//@ aux-build:remapped_dep.rs
//@ compile-flags: --remap-path-prefix={{src-base}}/errors/auxiliary=remapped-aux

//@ revisions: local-self remapped-self
// [local-self] no-remap-src-base: The hack should work regardless of remapping.
//@ [remapped-self] remap-src-base

// Verify that the expected source code is shown.
//@ error-pattern: pub struct SomeStruct {} // This line should be show

extern crate remapped_dep;

fn main() {
    // The actual error is irrelevant. The important part it that is should show
    // a snippet of the dependency's source.
    let _ = remapped_dep::SomeStruct;
    //~^ ERROR expected value, found struct `remapped_dep::SomeStruct`
}