]> git.lizzy.rs Git - rust.git/blob - src/test/incremental/krate-inherent.rs
Auto merge of #62339 - pnkfelix:issue-61188-use-visitor-for-structural-match-check...
[rust.git] / src / test / incremental / krate-inherent.rs
1 // revisions: cfail1 cfail2
2 // compile-flags: -Z query-dep-graph
3 // build-pass (FIXME(62277): could be check-pass?)
4
5 #![allow(warnings)]
6 #![feature(rustc_attrs)]
7 #![rustc_partition_reused(module="krate_inherent-x", cfg="cfail2")]
8 #![crate_type = "rlib"]
9
10 pub mod x {
11     pub struct Foo;
12     impl Foo {
13         pub fn foo(&self) { }
14     }
15
16     pub fn method() {
17         let x: Foo = Foo;
18         x.foo(); // inherent methods used to add an edge from Krate
19     }
20 }
21
22 #[cfg(cfail1)]
23 pub fn bar() { } // remove this unrelated fn in cfail2, which should not affect `x::method`