diff --git a/src/test/compile-fail/dep-graph-caller-callee.rs b/src/test/compile-fail/dep-graph-caller-callee.rs index 8e46603711f..acd6091cbdd 100644 --- a/src/test/compile-fail/dep-graph-caller-callee.rs +++ b/src/test/compile-fail/dep-graph-caller-callee.rs @@ -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)] diff --git a/src/test/compile-fail/dep-graph-struct-signature.rs b/src/test/compile-fail/dep-graph-struct-signature.rs index 2c4fe5c96b8..5cfb748b6f4 100644 --- a/src/test/compile-fail/dep-graph-struct-signature.rs +++ b/src/test/compile-fail/dep-graph-struct-signature.rs @@ -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 @@ mod signatures { #[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 diff --git a/src/test/compile-fail/dep-graph-trait-impl-two-traits-same-method.rs b/src/test/compile-fail/dep-graph-trait-impl-two-traits-same-method.rs index 1003f92f161..57e83586d8d 100644 --- a/src/test/compile-fail/dep-graph-trait-impl-two-traits-same-method.rs +++ b/src/test/compile-fail/dep-graph-trait-impl-two-traits-same-method.rs @@ -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)] diff --git a/src/test/compile-fail/dep-graph-trait-impl-two-traits.rs b/src/test/compile-fail/dep-graph-trait-impl-two-traits.rs index 34a9dbfd62a..ba54a056209 100644 --- a/src/test/compile-fail/dep-graph-trait-impl-two-traits.rs +++ b/src/test/compile-fail/dep-graph-trait-impl-two-traits.rs @@ -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)] diff --git a/src/test/compile-fail/dep-graph-trait-impl.rs b/src/test/compile-fail/dep-graph-trait-impl.rs index da0c77c26d1..83e924fe06d 100644 --- a/src/test/compile-fail/dep-graph-trait-impl.rs +++ b/src/test/compile-fail/dep-graph-trait-impl.rs @@ -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)] diff --git a/src/test/compile-fail/dep-graph-unrelated.rs b/src/test/compile-fail/dep-graph-unrelated.rs index fa204a5c76c..8feec12a2f7 100644 --- a/src/test/compile-fail/dep-graph-unrelated.rs +++ b/src/test/compile-fail/dep-graph-unrelated.rs @@ -10,6 +10,8 @@ // Test that two unrelated functions have no trans dependency. +// compile-flags: -Z incr-comp + #![feature(rustc_attrs)] #![allow(dead_code)]