]> git.lizzy.rs Git - rust.git/blob - tests/incremental/krate-inherent.rs
Rollup merge of #107700 - jyn514:tools-builder, r=Mark-Simulacrum
[rust.git] / tests / 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 hir_crate
19     }
20 }
21
22 #[cfg(cfail1)]
23 pub fn bar() {} // remove this unrelated fn in cfail2, which should not affect `x::method`