From 78b54c07e5cfc0287d87b132dc7774aed6b36922 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sun, 20 Nov 2016 13:22:44 +0100 Subject: [PATCH] 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. --- src/test/incremental/hello_world.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/test/incremental/hello_world.rs b/src/test/incremental/hello_world.rs index 7138b4c7604e..14e4cfcd988d 100644 --- a/src/test/incremental/hello_world.rs +++ b/src/test/incremental/hello_world.rs @@ -18,12 +18,12 @@ 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 } } @@ -31,9 +31,10 @@ mod x { 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(); } } @@ -42,6 +43,6 @@ mod z { #[rustc_clean(label="TypeckItemBody", cfg="rpass2")] pub fn z() { - y::y(); + y::yyyy(); } }