]> git.lizzy.rs Git - rust.git/blob - src/test/incremental/krate-inlined.rs
Move the `krate` method to Hir and remove the Krate dep node
[rust.git] / src / test / incremental / krate-inlined.rs
1 // Regr. test that using HIR inlined from another krate does *not* add
2 // a dependency from the local hir_crate node. We can't easily test that
3 // directly anymore, so now we test that we get reuse.
4
5 // revisions: rpass1 rpass2
6 // compile-flags: -Z query-dep-graph
7
8 #![allow(warnings)]
9 #![feature(rustc_attrs)]
10 #![rustc_partition_reused(module = "krate_inlined-x", cfg = "rpass2")]
11
12 fn main() {
13     x::method();
14
15     #[cfg(rpass2)]
16     ()
17 }
18
19 mod x {
20     pub fn method() {
21         // use some methods that require inlining HIR from another crate:
22         let mut v = vec![];
23         v.push(1);
24     }
25 }