about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2017-05-02 17:47:38 -0400
committerNiko Matsakis <niko@alum.mit.edu>2017-05-03 16:42:07 -0400
commit50df5f85d05fc1a7967905f230205c559c09cba2 (patch)
tree47629f85c2c8fc4a30ee98ffc8a0ef4aeb91a7dd /src
parente8f6fbb25555bd7e4b0e6cbdc4f7dfbe96ebe16c (diff)
downloadrust-50df5f85d05fc1a7967905f230205c559c09cba2.tar.gz
rust-50df5f85d05fc1a7967905f230205c559c09cba2.zip
correct the new graphs resulting from various tests
(Now that variances are not part of signature.)
Diffstat (limited to 'src')
-rw-r--r--src/test/compile-fail/dep-graph-struct-signature.rs6
-rw-r--r--src/test/compile-fail/dep-graph-type-alias.rs12
2 files changed, 13 insertions, 5 deletions
diff --git a/src/test/compile-fail/dep-graph-struct-signature.rs b/src/test/compile-fail/dep-graph-struct-signature.rs
index 7ed8b95f88b..3f568194e23 100644
--- a/src/test/compile-fail/dep-graph-struct-signature.rs
+++ b/src/test/compile-fail/dep-graph-struct-signature.rs
@@ -58,13 +58,15 @@ mod signatures {
         fn method(&self, x: u32) { }
     }
 
-    #[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
     struct WillChanges {
+        #[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
         x: WillChange,
+        #[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
         y: WillChange
     }
 
-    #[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
+    // The fields change, not the type itself.
+    #[rustc_then_this_would_need(ItemSignature)] //~ ERROR no path
     fn indirect(x: WillChanges) { }
 }
 
diff --git a/src/test/compile-fail/dep-graph-type-alias.rs b/src/test/compile-fail/dep-graph-type-alias.rs
index 4cc15e8b522..56636a00a31 100644
--- a/src/test/compile-fail/dep-graph-type-alias.rs
+++ b/src/test/compile-fail/dep-graph-type-alias.rs
@@ -23,15 +23,21 @@ fn main() { }
 #[rustc_if_this_changed]
 type TypeAlias = u32;
 
-#[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
+// The type alias directly affects the type of the field,
+// not the enclosing struct:
+#[rustc_then_this_would_need(ItemSignature)] //~ ERROR no path
 struct Struct {
+    #[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
     x: TypeAlias,
     y: u32
 }
 
-#[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
+#[rustc_then_this_would_need(ItemSignature)] //~ ERROR no path
 enum Enum {
-    Variant1(TypeAlias),
+    Variant1 {
+        #[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
+        t: TypeAlias
+    },
     Variant2(i32)
 }