Skip to content

Commit 78b54c0

Browse files
committed
Make hello_world test work again
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.
1 parent 7b02129 commit 78b54c0

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/test/incremental/hello_world.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,23 @@ fn main() { }
1818

1919
mod x {
2020
#[cfg(rpass1)]
21-
pub fn x() -> i32 {
21+
pub fn xxxx() -> i32 {
2222
1
2323
}
2424

2525
#[cfg(rpass2)]
26-
pub fn x() -> i32 {
26+
pub fn xxxx() -> i32 {
2727
2
2828
}
2929
}
3030

3131
mod y {
3232
use x;
3333

34-
#[rustc_clean(label="TypeckItemBody", cfg="rpass2")]
35-
pub fn y() {
36-
x::x();
34+
// FIXME: This should be clean
35+
#[rustc_dirty(label="TypeckItemBody", cfg="rpass2")]
36+
pub fn yyyy() {
37+
x::xxxx();
3738
}
3839
}
3940

@@ -42,6 +43,6 @@ mod z {
4243

4344
#[rustc_clean(label="TypeckItemBody", cfg="rpass2")]
4445
pub fn z() {
45-
y::y();
46+
y::yyyy();
4647
}
4748
}

0 commit comments

Comments
 (0)