]>
Commit | Line | Data |
---|---|---|
7cac9316 XL |
1 | // Copyright 2017 The Rust Project Developers. See the COPYRIGHT |
2 | // file at the top-level directory of this distribution and at | |
3 | // http://rust-lang.org/COPYRIGHT. | |
4 | // | |
5 | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | |
6 | // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | |
7 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | |
8 | // option. This file may not be copied, modified, or distributed | |
9 | // except according to those terms. | |
10 | ||
11 | // revisions:rpass1 rpass2 rpass3 | |
12 | // compile-flags: -Z query-dep-graph -g -Zincremental-cc | |
13 | // aux-build:extern_crate.rs | |
14 | ||
15 | ||
16 | // This test case makes sure that we detect if paths emitted into debuginfo | |
17 | // are changed, even when the change happens in an external crate. | |
18 | ||
19 | #![feature(rustc_attrs)] | |
20 | ||
21 | #![rustc_partition_reused(module="main", cfg="rpass2")] | |
22 | #![rustc_partition_reused(module="main-some_mod", cfg="rpass2")] | |
23 | #![rustc_partition_reused(module="main", cfg="rpass3")] | |
24 | #![rustc_partition_translated(module="main-some_mod", cfg="rpass3")] | |
25 | ||
26 | extern crate extern_crate; | |
27 | ||
28 | #[rustc_clean(label="TransCrateItem", cfg="rpass2")] | |
29 | #[rustc_clean(label="TransCrateItem", cfg="rpass3")] | |
30 | fn main() { | |
31 | some_mod::some_fn(); | |
32 | } | |
33 | ||
34 | mod some_mod { | |
35 | use extern_crate; | |
36 | ||
37 | #[rustc_clean(label="TransCrateItem", cfg="rpass2")] | |
38 | #[rustc_dirty(label="TransCrateItem", cfg="rpass3")] | |
39 | pub fn some_fn() { | |
40 | extern_crate::inline_fn(); | |
41 | } | |
42 | } |