]> git.lizzy.rs Git - rust.git/commitdiff
Fix dependency graph test cases to have correct commments and use -Z incr-comp
authorNiko Matsakis <niko@alum.mit.edu>
Wed, 6 Jan 2016 16:29:00 +0000 (11:29 -0500)
committerNiko Matsakis <niko@alum.mit.edu>
Wed, 6 Jan 2016 16:29:00 +0000 (11:29 -0500)
src/test/compile-fail/dep-graph-caller-callee.rs
src/test/compile-fail/dep-graph-struct-signature.rs
src/test/compile-fail/dep-graph-trait-impl-two-traits-same-method.rs
src/test/compile-fail/dep-graph-trait-impl-two-traits.rs
src/test/compile-fail/dep-graph-trait-impl.rs
src/test/compile-fail/dep-graph-unrelated.rs

index 8e46603711fea335439a389c19dd15e10f5b4b55..acd6091cbdd482c93319d7474ecaa14473dcfac5 100644 (file)
@@ -8,7 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// Test that two unrelated functions have no trans dependency.
+// Test that immediate callers have to change when callee changes, but
+// not callers' callers.
+
+// compile-flags: -Z incr-comp
 
 #![feature(rustc_attrs)]
 #![allow(dead_code)]
index 2c4fe5c96b806cbb22d27b498038055ab80810aa..5cfb748b6f4596f188d69f321edce56403a82261 100644 (file)
@@ -8,7 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// Test that two unrelated functions have no trans dependency.
+// Test cases where a changing struct appears in the signature of fns
+// and methods.
+
+// compile-flags: -Z incr-comp
 
 #![feature(rustc_attrs)]
 #![allow(dead_code)]
@@ -68,7 +71,7 @@ struct WillChanges {
 
     #[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
     #[rustc_then_this_would_need(CollectItem)] //~ ERROR OK
-    fn indirect(x: WillChange) { }
+    fn indirect(x: WillChanges) { }
 }
 
 // these are invalid dependencies, though sometimes we create edges
index 1003f92f161913513332aa71e4ce88238fea83d5..57e83586d8d37b79c5b32c87fb0c5081b21e8127 100644 (file)
@@ -8,7 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// Test that two unrelated functions have no trans dependency.
+// Test that adding an impl to a trait `Foo` DOES affect functions
+// that only use `Bar` if they have methods in common.
+
+// compile-flags: -Z incr-comp
 
 #![feature(rustc_attrs)]
 #![allow(dead_code)]
index 34a9dbfd62a6284d3e120012c17c9a759d620c0f..ba54a056209454720f1012c6233b723140fb7ed7 100644 (file)
@@ -9,7 +9,9 @@
 // except according to those terms.
 
 // Test that adding an impl to a trait `Foo` does not affect functions
-// that only use `Bar`.
+// that only use `Bar`, so long as they do not have methods in common.
+
+// compile-flags: -Z incr-comp
 
 #![feature(rustc_attrs)]
 #![allow(warnings)]
index da0c77c26d1b071b39a191c8bb252079e7995d06..83e924fe06d7dfd223f57744b53fe32a95a9f0a5 100644 (file)
@@ -8,7 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// Test that two unrelated functions have no trans dependency.
+// Test that when a trait impl changes, fns whose body uses that trait
+// must also be recompiled.
+
+// compile-flags: -Z incr-comp
 
 #![feature(rustc_attrs)]
 #![allow(warnings)]
index fa204a5c76cc75f11125d4fa118af4ee8cf037b1..8feec12a2f76c975d9cb284db890445c65771870 100644 (file)
@@ -10,6 +10,8 @@
 
 // Test that two unrelated functions have no trans dependency.
 
+// compile-flags: -Z incr-comp
+
 #![feature(rustc_attrs)]
 #![allow(dead_code)]