]> git.lizzy.rs Git - rust.git/commitdiff
Make hello_world test work again
authorFlorian Diebold <flodiebold@gmail.com>
Sun, 20 Nov 2016 12:22:44 +0000 (13:22 +0100)
committerFlorian Diebold <florian.diebold@freiheit.com>
Tue, 29 Nov 2016 12:04:27 +0000 (13:04 +0100)
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

index 7138b4c7604e97ffa8f4329dec30ab7850372985..14e4cfcd988db92d24818adf7822585080f67275 100644 (file)
@@ -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 @@ pub fn x() -> i32 {
 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();
     }
 }