about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Hewson <michael@michaelhewson.ca>2017-11-07 05:16:24 -0500
committerMichael Hewson <michael@michaelhewson.ca>2017-11-07 13:36:10 -0500
commit6fd215647ddc0abf0d5b02f567dca125c9df5c31 (patch)
treeda7caa2e266d2c005333b0bbc18dd2b685b26fc8
parentaa0df3da3d5fc4535933ba920135361a6e1e95d6 (diff)
downloadrust-6fd215647ddc0abf0d5b02f567dca125c9df5c31.tar.gz
rust-6fd215647ddc0abf0d5b02f567dca125c9df5c31.zip
Add arbitrary_self_types feature gate error to some tests
-rw-r--r--src/test/compile-fail/issue-26194.rs1
-rw-r--r--src/test/compile-fail/ufcs-explicit-self-bad.rs12
2 files changed, 10 insertions, 3 deletions
diff --git a/src/test/compile-fail/issue-26194.rs b/src/test/compile-fail/issue-26194.rs
index 7ddd56229ce..439115a258d 100644
--- a/src/test/compile-fail/issue-26194.rs
+++ b/src/test/compile-fail/issue-26194.rs
@@ -13,6 +13,7 @@ struct S(String);
 impl S {
     fn f(self: *mut S) -> String { self.0 }
     //~^ ERROR invalid `self` type
+    //~| ERROR arbitrary `self` types are unstable
 }
 
 fn main() { S("".to_owned()).f(); }
diff --git a/src/test/compile-fail/ufcs-explicit-self-bad.rs b/src/test/compile-fail/ufcs-explicit-self-bad.rs
index 9c98ead4d19..6fc2828f669 100644
--- a/src/test/compile-fail/ufcs-explicit-self-bad.rs
+++ b/src/test/compile-fail/ufcs-explicit-self-bad.rs
@@ -15,7 +15,9 @@ struct Foo {
 }
 
 impl Foo {
-    fn foo(self: isize, x: isize) -> isize {  //~ ERROR invalid `self` type
+    fn foo(self: isize, x: isize) -> isize {
+        //~^ ERROR invalid `self` type
+        //~| ERROR arbitrary `self` types are unstable
         self.f + x
     }
 }
@@ -25,10 +27,14 @@ struct Bar<T> {
 }
 
 impl<T> Bar<T> {
-    fn foo(self: Bar<isize>, x: isize) -> isize { //~ ERROR invalid `self` type
+    fn foo(self: Bar<isize>, x: isize) -> isize {
+        //~^ ERROR invalid `self` type
+        //~| ERROR arbitrary `self` types are unstable
         x
     }
-    fn bar(self: &Bar<usize>, x: isize) -> isize {   //~ ERROR invalid `self` type
+    fn bar(self: &Bar<usize>, x: isize) -> isize {
+        //~^ ERROR invalid `self` type
+        //~| ERROR arbitrary `self` types are unstable
         x
     }
 }