]> git.lizzy.rs Git - rust.git/blob - tests/ui/errors/remap-path-prefix-reverse.rs
Rollup merge of #106835 - compiler-errors:new-solver-gat-rebase-oops, r=lcnr
[rust.git] / tests / ui / errors / remap-path-prefix-reverse.rs
1 // aux-build:remapped_dep.rs
2 // compile-flags: --remap-path-prefix={{src-base}}/errors/auxiliary=remapped-aux
3
4 // The remapped paths are not normalized by compiletest.
5 // normalize-stderr-test: "\\(errors)" -> "/$1"
6
7 // revisions: local-self remapped-self
8 // [remapped-self]compile-flags: --remap-path-prefix={{src-base}}=remapped
9
10 // The paths from `remapped-self` aren't recognized by compiletest, so we
11 // cannot use line-specific patterns for the actual error.
12 // error-pattern: E0423
13
14 // Verify that the expected source code is shown.
15 // error-pattern: pub struct SomeStruct {} // This line should be show
16
17 extern crate remapped_dep;
18
19 fn main() {
20     // The actual error is irrelevant. The important part it that is should show
21     // a snippet of the dependency's source.
22     let _ = remapped_dep::SomeStruct;
23 }