about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorAriel Ben-Yehuda <ariel.byd@gmail.com>2016-05-25 21:12:35 +0300
committerAriel Ben-Yehuda <ariel.byd@gmail.com>2016-05-25 21:12:35 +0300
commit040fc94b4eaeb24b6da297a763a28df66473e34d (patch)
treedde0812a59f7e5bea78b60a4a622cc6f06edc19c /src/test
parentc209d44c342a664bad5428ff988ee1084c13bed7 (diff)
downloadrust-040fc94b4eaeb24b6da297a763a28df66473e34d.tar.gz
rust-040fc94b4eaeb24b6da297a763a28df66473e34d.zip
catch attempts to leak obligations out of snapshots
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/regions-bound-missing-bound-in-impl.rs3
-rw-r--r--src/test/compile-fail/regions-trait-1.rs2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/test/compile-fail/regions-bound-missing-bound-in-impl.rs b/src/test/compile-fail/regions-bound-missing-bound-in-impl.rs
index abffd33e3f8..6e60a373d9b 100644
--- a/src/test/compile-fail/regions-bound-missing-bound-in-impl.rs
+++ b/src/test/compile-fail/regions-bound-missing-bound-in-impl.rs
@@ -34,7 +34,8 @@ impl<'a, 't> Foo<'a, 't> for &'a isize {
     }
 
     fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) {
-        //~^ ERROR method `wrong_bound1` has an incompatible type for trait
+        //~^ ERROR method not compatible with trait
+        //~^^ ERROR method not compatible with trait
         //
         // Note: This is a terrible error message. It is caused
         // because, in the trait, 'b is early bound, and in the impl,
diff --git a/src/test/compile-fail/regions-trait-1.rs b/src/test/compile-fail/regions-trait-1.rs
index 01439ce5e68..9cd08656b62 100644
--- a/src/test/compile-fail/regions-trait-1.rs
+++ b/src/test/compile-fail/regions-trait-1.rs
@@ -23,7 +23,7 @@ impl<'a> get_ctxt for has_ctxt<'a> {
 
     // Here an error occurs because we used `&self` but
     // the definition used `&`:
-    fn get_ctxt(&self) -> &'a ctxt { //~ ERROR method `get_ctxt` has an incompatible type
+    fn get_ctxt(&self) -> &'a ctxt { //~ ERROR method not compatible with trait
         self.c
     }