]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/dep-graph-type-alias.rs
Split DepNode::ItemSignature into non-overlapping variants.
[rust.git] / src / test / compile-fail / dep-graph-type-alias.rs
index 56636a00a313a26afb911c4cce8f3a32d517d709..dca1fa4d98f95d97226ff11a32a79306e26cdb45 100644 (file)
@@ -25,40 +25,42 @@ fn main() { }
 
 // The type alias directly affects the type of the field,
 // not the enclosing struct:
-#[rustc_then_this_would_need(ItemSignature)] //~ ERROR no path
+#[rustc_then_this_would_need(TypeOfItem)] //~ ERROR no path
 struct Struct {
-    #[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
+    #[rustc_then_this_would_need(TypeOfItem)] //~ ERROR OK
     x: TypeAlias,
     y: u32
 }
 
-#[rustc_then_this_would_need(ItemSignature)] //~ ERROR no path
+#[rustc_then_this_would_need(TypeOfItem)] //~ ERROR no path
 enum Enum {
     Variant1 {
-        #[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
+        #[rustc_then_this_would_need(TypeOfItem)] //~ ERROR OK
         t: TypeAlias
     },
     Variant2(i32)
 }
 
-#[rustc_then_this_would_need(ItemSignature)] //~ ERROR no path
+#[rustc_then_this_would_need(TypeOfItem)] //~ ERROR no path
 trait Trait {
-    #[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
+    #[rustc_then_this_would_need(FnSignature)] //~ ERROR OK
     fn method(&self, _: TypeAlias);
 }
 
 struct SomeType;
 
-#[rustc_then_this_would_need(ItemSignature)] //~ ERROR no path
+#[rustc_then_this_would_need(TypeOfItem)] //~ ERROR no path
 impl SomeType {
-    #[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
+    #[rustc_then_this_would_need(FnSignature)] //~ ERROR OK
+    #[rustc_then_this_would_need(TypeckTables)] //~ ERROR OK
     fn method(&self, _: TypeAlias) {}
 }
 
-#[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
+#[rustc_then_this_would_need(TypeOfItem)] //~ ERROR OK
 type TypeAlias2 = TypeAlias;
 
-#[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
+#[rustc_then_this_would_need(FnSignature)] //~ ERROR OK
+#[rustc_then_this_would_need(TypeckTables)] //~ ERROR OK
 fn function(_: TypeAlias) {
 
 }