about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2020-02-12 18:50:30 +0100
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2020-03-14 22:52:31 +0100
commit7118f71ea1f7ad0fb1cf8e2a0c9d512c534604c6 (patch)
tree903c56dfe04d4805b881c602b36add3340fb0a79
parent6258c0144df5f47bfa4aed7d7fa0d6aa86990e46 (diff)
downloadrust-7118f71ea1f7ad0fb1cf8e2a0c9d512c534604c6.tar.gz
rust-7118f71ea1f7ad0fb1cf8e2a0c9d512c534604c6.zip
Update ich_nested_items.rs
-rw-r--r--src/test/incremental/ich_nested_items.rs19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/test/incremental/ich_nested_items.rs b/src/test/incremental/ich_nested_items.rs
index c30cfc49bdc..a9232190eef 100644
--- a/src/test/incremental/ich_nested_items.rs
+++ b/src/test/incremental/ich_nested_items.rs
@@ -7,18 +7,21 @@
 #![crate_type = "rlib"]
 #![feature(rustc_attrs)]
 
-#[rustc_clean(label="hir_owner", cfg="cfail2")]
-#[rustc_dirty(label="hir_owner_items", cfg="cfail2")]
+#[rustc_clean(label = "hir_owner", cfg = "cfail2")]
+#[rustc_dirty(label = "hir_owner_items", cfg = "cfail2")]
 pub fn foo() {
     #[cfg(cfail1)]
-    pub fn baz() { } // order is different...
+    pub fn baz() {} // order is different...
 
-    #[rustc_clean(label="hir_owner", cfg="cfail2")]
-    #[rustc_clean(label="hir_owner_items", cfg="cfail2")]
-    pub fn bar() { } // but that doesn't matter.
+    // FIXME: Make "hir_owner" use `rustc_clean` here. Currently "hir_owner" includes a reference to
+    // the parent node, which is the statement holding this item. Changing the position of
+    // `bar` in `foo` will update that reference and make `hir_owner(bar)` dirty.
+    #[rustc_dirty(label = "hir_owner", cfg = "cfail2")]
+    #[rustc_clean(label = "hir_owner_items", cfg = "cfail2")]
+    pub fn bar() {} // but that doesn't matter.
 
     #[cfg(cfail2)]
-    pub fn baz() { } // order is different...
+    pub fn baz() {} // order is different...
 
-    pub fn bap() { } // neither does adding a new item
+    pub fn bap() {} // neither does adding a new item
 }