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