Skip to content

Commit

Permalink
Make hello_world test work again
Browse files Browse the repository at this point in the history
This used to work with the rustc_clean attribute, but doesn't anymore
since my rebase; but I don't know enough about the type checking to find
out what's wrong. The dep graph looks like this:

ItemSignature(xxxx) -> CollectItem(xxxx)
CollectItem(xxxx) -> ItemSignature(xxxx)
ItemSignature(xxxx) -> TypeckItemBody(yyyy)
HirBody(xxxx) -> CollectItem(xxxx)

The cycle between CollectItem and ItemSignature looks wrong, and my
guess is the CollectItem -> ItemSignature edge shouldn't be there, but
I'm not sure how to prevent it.
  • Loading branch information
flodiebold committed Nov 29, 2016
1 parent 7b02129 commit 78b54c0
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/test/incremental/hello_world.rs
Expand Up @@ -18,22 +18,23 @@ fn main() { }

mod x {
#[cfg(rpass1)]
pub fn x() -> i32 {
pub fn xxxx() -> i32 {
1
}

#[cfg(rpass2)]
pub fn x() -> i32 {
pub fn xxxx() -> i32 {
2
}
}

mod y {
use x;

#[rustc_clean(label="TypeckItemBody", cfg="rpass2")]
pub fn y() {
x::x();
// FIXME: This should be clean
#[rustc_dirty(label="TypeckItemBody", cfg="rpass2")]
pub fn yyyy() {
x::xxxx();
}
}

Expand All @@ -42,6 +43,6 @@ mod z {

#[rustc_clean(label="TypeckItemBody", cfg="rpass2")]
pub fn z() {
y::y();
y::yyyy();
}
}

0 comments on commit 78b54c0

Please sign in to comment.