2017-10-27 11:57:15 -05:00
|
|
|
// revisions: cfail1 cfail2
|
2016-08-24 05:49:44 -05:00
|
|
|
// compile-flags: -Z query-dep-graph
|
2019-07-02 16:30:28 -05:00
|
|
|
// build-pass (FIXME(62277): could be check-pass?)
|
2016-08-24 05:49:44 -05:00
|
|
|
|
|
|
|
#![allow(warnings)]
|
|
|
|
#![feature(rustc_attrs)]
|
2020-02-06 05:46:26 -06:00
|
|
|
#![rustc_partition_reused(module = "krate_inherent-x", cfg = "cfail2")]
|
2017-10-27 11:57:15 -05:00
|
|
|
#![crate_type = "rlib"]
|
2016-08-24 05:49:44 -05:00
|
|
|
|
2017-10-27 11:57:15 -05:00
|
|
|
pub mod x {
|
|
|
|
pub struct Foo;
|
2016-08-24 05:49:44 -05:00
|
|
|
impl Foo {
|
2020-02-06 05:46:26 -06:00
|
|
|
pub fn foo(&self) {}
|
2016-08-24 05:49:44 -05:00
|
|
|
}
|
|
|
|
|
2017-10-27 11:57:15 -05:00
|
|
|
pub fn method() {
|
2016-08-24 05:49:44 -05:00
|
|
|
let x: Foo = Foo;
|
2020-02-06 05:46:26 -06:00
|
|
|
x.foo(); // inherent methods used to add an edge from hir_crate
|
2016-08-24 05:49:44 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-27 11:57:15 -05:00
|
|
|
#[cfg(cfail1)]
|
2020-02-06 05:46:26 -06:00
|
|
|
pub fn bar() {} // remove this unrelated fn in cfail2, which should not affect `x::method`
|