about summary refs log tree commit diff
path: root/src/test/compile-fail/cross-fn-cache-hole.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/compile-fail/cross-fn-cache-hole.rs')
-rw-r--r--src/test/compile-fail/cross-fn-cache-hole.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/test/compile-fail/cross-fn-cache-hole.rs b/src/test/compile-fail/cross-fn-cache-hole.rs
index 0aefd0ae288..7d4c618de66 100644
--- a/src/test/compile-fail/cross-fn-cache-hole.rs
+++ b/src/test/compile-fail/cross-fn-cache-hole.rs
@@ -21,14 +21,15 @@ trait Foo<X,Y>: Bar<X> {
 
 trait Bar<X> { }
 
-fn vacuous<A>()
+// We don't always check where clauses for sanity, but in this case
+// wfcheck does report an error here:
+fn vacuous<A>() //~ ERROR the trait `Bar<u32>` is not implemented for the type `i32`
     where i32: Foo<u32, A>
 {
-    // vacuous could never be called, because it requires that i32:
-    // Bar<u32>. But the code doesn't check that this could never be
-    // satisfied.
+    // ... the original intention was to check that we don't use that
+    // vacuous where clause (which could never be satisfied) to accept
+    // the following line and then mess up calls elsewhere.
     require::<i32, u32>();
-    //~^ ERROR the trait `Bar<u32>` is not implemented for the type `i32`
 }
 
 fn require<A,B>()