about summary refs log tree commit diff
path: root/src/test/compile-fail
diff options
context:
space:
mode:
authorCengiz Can <cengizc@gmail.com>2017-02-02 21:35:31 +0000
committerCengiz Can <cengizc@gmail.com>2017-02-04 16:25:56 -0500
commit3fa28cb206604fddf67a29e7cbd3a8b22da1edc2 (patch)
tree92ac5b08f840db5d4d09fd77cefeecdd9e3ae290 /src/test/compile-fail
parent7aff6add92c5f8deea29af2a5aa7335d4e5843a9 (diff)
Add a new ui test and update existing ones
Diffstat (limited to 'src/test/compile-fail')
-rw-r--r--src/test/compile-fail/issue-12187-1.rs5
-rw-r--r--src/test/compile-fail/issue-12187-2.rs5
-rw-r--r--src/test/compile-fail/issue-16966.rs2
-rw-r--r--src/test/compile-fail/issue-17551.rs2
-rw-r--r--src/test/compile-fail/issue-18159.rs2
-rw-r--r--src/test/compile-fail/issue-23041.rs3
-rw-r--r--src/test/compile-fail/issue-23046.rs2
-rw-r--r--src/test/compile-fail/issue-24013.rs2
-rw-r--r--src/test/compile-fail/issue-5062.rs2
-rw-r--r--src/test/compile-fail/issue-6458-2.rs2
-rw-r--r--src/test/compile-fail/issue-6458-3.rs5
-rw-r--r--src/test/compile-fail/issue-6458.rs5
-rw-r--r--src/test/compile-fail/issue-7813.rs7
-rw-r--r--src/test/compile-fail/method-ambig-one-trait-unknown-int-type.rs2
-rw-r--r--src/test/compile-fail/traits-multidispatch-convert-ambig-dest.rs5
-rw-r--r--src/test/compile-fail/unconstrained-none.rs5
-rw-r--r--src/test/compile-fail/unconstrained-ref.rs5
-rw-r--r--src/test/compile-fail/vector-no-ann.rs7
18 files changed, 29 insertions, 39 deletions
diff --git a/src/test/compile-fail/issue-12187-1.rs b/src/test/compile-fail/issue-12187-1.rs
index 8f9b897eae2..346fae11070 100644
--- a/src/test/compile-fail/issue-12187-1.rs
+++ b/src/test/compile-fail/issue-12187-1.rs
@@ -14,7 +14,6 @@ fn new<T>() -> &'static T {
 
 fn main() {
     let &v = new();
-    //~^ ERROR unable to fully infer type(s) [E0282]
-    //~| NOTE cannot infer type
-    //~| NOTE type annotations or generic parameter binding
+    //~^ ERROR type annotations needed [E0282]
+    //~| NOTE cannot infer type for `_`
 }
diff --git a/src/test/compile-fail/issue-12187-2.rs b/src/test/compile-fail/issue-12187-2.rs
index 29ae04a3aac..848174d6fe1 100644
--- a/src/test/compile-fail/issue-12187-2.rs
+++ b/src/test/compile-fail/issue-12187-2.rs
@@ -14,7 +14,6 @@ fn new<'r, T>() -> &'r T {
 
 fn main() {
     let &v = new();
-    //~^ ERROR unable to fully infer type(s) [E0282]
-    //~| NOTE cannot infer type
-    //~| NOTE type annotations or generic parameter binding
+    //~^ ERROR type annotations needed [E0282]
+    //~| NOTE cannot infer type for `_`
 }
diff --git a/src/test/compile-fail/issue-16966.rs b/src/test/compile-fail/issue-16966.rs
index 508442fcb94..ecf81c8af17 100644
--- a/src/test/compile-fail/issue-16966.rs
+++ b/src/test/compile-fail/issue-16966.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern:type annotations or generic parameter binding required
+// error-pattern:type annotations needed
 fn main() {
     panic!(
         std::default::Default::default()
diff --git a/src/test/compile-fail/issue-17551.rs b/src/test/compile-fail/issue-17551.rs
index 332d3fb3e2b..b55863f0dda 100644
--- a/src/test/compile-fail/issue-17551.rs
+++ b/src/test/compile-fail/issue-17551.rs
@@ -13,6 +13,6 @@ use std::marker;
 struct B<T>(marker::PhantomData<T>);
 
 fn main() {
-    let foo = B(marker::PhantomData); //~ ERROR unable to fully infer type(s)
+    let foo = B(marker::PhantomData); //~ ERROR type annotations needed
     let closure = || foo;
 }
diff --git a/src/test/compile-fail/issue-18159.rs b/src/test/compile-fail/issue-18159.rs
index 7338d2cb418..8991eded3d6 100644
--- a/src/test/compile-fail/issue-18159.rs
+++ b/src/test/compile-fail/issue-18159.rs
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 fn main() {
-    let x; //~ ERROR unable to fully infer type(s)
+    let x; //~ ERROR type annotations needed
 }
diff --git a/src/test/compile-fail/issue-23041.rs b/src/test/compile-fail/issue-23041.rs
index f67d8affd30..4dfad4ee3c3 100644
--- a/src/test/compile-fail/issue-23041.rs
+++ b/src/test/compile-fail/issue-23041.rs
@@ -14,6 +14,5 @@ fn main()
     fn bar(x:i32) ->i32 { 3*x };
     let b:Box<Any> = Box::new(bar as fn(_)->_);
     b.downcast_ref::<fn(_)->_>(); //~ ERROR E0282
-                                  //~| NOTE cannot infer type
-                                  //~| NOTE type annotations or generic parameter binding required
+                                  //~| NOTE cannot infer type for `_`
 }
diff --git a/src/test/compile-fail/issue-23046.rs b/src/test/compile-fail/issue-23046.rs
index c80923298bc..28109747b75 100644
--- a/src/test/compile-fail/issue-23046.rs
+++ b/src/test/compile-fail/issue-23046.rs
@@ -25,6 +25,6 @@ pub fn let_<'var, VAR, F: for<'v: 'var> Fn(Expr<'v, VAR>) -> Expr<'v, VAR>>
 
 fn main() {
     let ex = |x| {
-        let_(add(x,x), |y| { //~ ERROR unable to fully infer type(s)
+        let_(add(x,x), |y| { //~ ERROR type annotations needed
             let_(add(x, x), |x|x)})};
 }
diff --git a/src/test/compile-fail/issue-24013.rs b/src/test/compile-fail/issue-24013.rs
index edd876ed663..a7232781f6f 100644
--- a/src/test/compile-fail/issue-24013.rs
+++ b/src/test/compile-fail/issue-24013.rs
@@ -13,5 +13,5 @@ fn main() {
     let a = 1;
     let b = 2;
     unsafe {swap::<&mut _>(transmute(&a), transmute(&b))};
-    //~^ ERROR unable to fully infer type(s)
+    //~^ ERROR type annotations needed
 }
diff --git a/src/test/compile-fail/issue-5062.rs b/src/test/compile-fail/issue-5062.rs
index e61ca92c78a..ebfa4975d4d 100644
--- a/src/test/compile-fail/issue-5062.rs
+++ b/src/test/compile-fail/issue-5062.rs
@@ -9,4 +9,4 @@
 // except according to those terms.
 
 fn main() { format!("{:?}", None); }
-    //~^ ERROR unable to fully infer type(s) [E0282]
+    //~^ ERROR type annotations needed [E0282]
diff --git a/src/test/compile-fail/issue-6458-2.rs b/src/test/compile-fail/issue-6458-2.rs
index 77eb8b3e7a9..87cf2b3f740 100644
--- a/src/test/compile-fail/issue-6458-2.rs
+++ b/src/test/compile-fail/issue-6458-2.rs
@@ -11,5 +11,5 @@
 fn main() {
     // Unconstrained type:
     format!("{:?}", None);
-    //~^ ERROR unable to fully infer type(s) [E0282]
+    //~^ ERROR type annotations needed [E0282]
 }
diff --git a/src/test/compile-fail/issue-6458-3.rs b/src/test/compile-fail/issue-6458-3.rs
index a8ad8951c64..1503da2baa7 100644
--- a/src/test/compile-fail/issue-6458-3.rs
+++ b/src/test/compile-fail/issue-6458-3.rs
@@ -12,7 +12,6 @@ use std::mem;
 
 fn main() {
     mem::transmute(0);
-    //~^ ERROR unable to fully infer type(s) [E0282]
-    //~| NOTE cannot infer type
-    //~| NOTE type annotations or generic parameter binding
+    //~^ ERROR type annotations needed [E0282]
+    //~| NOTE cannot infer type for `U`
 }
diff --git a/src/test/compile-fail/issue-6458.rs b/src/test/compile-fail/issue-6458.rs
index 7d1b5cfffe4..db4d4e76c11 100644
--- a/src/test/compile-fail/issue-6458.rs
+++ b/src/test/compile-fail/issue-6458.rs
@@ -17,9 +17,8 @@ pub fn foo<State>(_: TypeWithState<State>) {}
 
 pub fn bar() {
    foo(TypeWithState(marker::PhantomData));
-   //~^ ERROR unable to fully infer type(s) [E0282]
-   //~| NOTE cannot infer type
-   //~| NOTE type annotations or generic parameter binding
+   //~^ ERROR type annotations needed [E0282]
+   //~| NOTE cannot infer type for `State`
 }
 
 fn main() {
diff --git a/src/test/compile-fail/issue-7813.rs b/src/test/compile-fail/issue-7813.rs
index c7510f215be..fdd89058fd3 100644
--- a/src/test/compile-fail/issue-7813.rs
+++ b/src/test/compile-fail/issue-7813.rs
@@ -10,8 +10,7 @@
 
 fn main() {
     let v = &[];
-    let it = v.iter(); //~ ERROR unable to fully infer type(s) [E0282]
-                       //~| NOTE cannot infer type
-                       //~| NOTE annotating the type for the variable `it` would help
-                       //~| NOTE type annotations or generic parameter binding
+    let it = v.iter(); //~ ERROR type annotations needed [E0282]
+                       //~| NOTE cannot infer type for `T`
+                       //~| NOTE consider giving `it` a type
 }
diff --git a/src/test/compile-fail/method-ambig-one-trait-unknown-int-type.rs b/src/test/compile-fail/method-ambig-one-trait-unknown-int-type.rs
index eeecefd91ae..9acf5a52166 100644
--- a/src/test/compile-fail/method-ambig-one-trait-unknown-int-type.rs
+++ b/src/test/compile-fail/method-ambig-one-trait-unknown-int-type.rs
@@ -32,7 +32,7 @@ impl foo for Vec<isize> {
 fn m1() {
     // we couldn't infer the type of the vector just based on calling foo()...
     let mut x = Vec::new();
-    //~^ ERROR unable to fully infer type(s) [E0282]
+    //~^ ERROR type annotations needed [E0282]
     x.foo();
 }
 
diff --git a/src/test/compile-fail/traits-multidispatch-convert-ambig-dest.rs b/src/test/compile-fail/traits-multidispatch-convert-ambig-dest.rs
index 6ccd8f66a49..2e115431c92 100644
--- a/src/test/compile-fail/traits-multidispatch-convert-ambig-dest.rs
+++ b/src/test/compile-fail/traits-multidispatch-convert-ambig-dest.rs
@@ -34,9 +34,8 @@ where T : Convert<U>
 
 fn a() {
     test(22, std::default::Default::default());
-    //~^ ERROR unable to fully infer type(s) [E0282]
-    //~| NOTE cannot infer type
-    //~| NOTE type annotations or generic parameter binding
+    //~^ ERROR type annotations needed [E0282]
+    //~| NOTE cannot infer type for `U`
 }
 
 fn main() {}
diff --git a/src/test/compile-fail/unconstrained-none.rs b/src/test/compile-fail/unconstrained-none.rs
index 49818791d2f..52ca91e62f8 100644
--- a/src/test/compile-fail/unconstrained-none.rs
+++ b/src/test/compile-fail/unconstrained-none.rs
@@ -11,7 +11,6 @@
 // Issue #5062
 
 fn main() {
-    None; //~ ERROR unable to fully infer type(s) [E0282]
-          //~| NOTE cannot infer type
-          //~| NOTE type annotations or generic parameter binding
+    None; //~ ERROR type annotations needed [E0282]
+          //~| NOTE cannot infer type for `T`
 }
diff --git a/src/test/compile-fail/unconstrained-ref.rs b/src/test/compile-fail/unconstrained-ref.rs
index 53995af5b86..6aaed789716 100644
--- a/src/test/compile-fail/unconstrained-ref.rs
+++ b/src/test/compile-fail/unconstrained-ref.rs
@@ -13,7 +13,6 @@ struct S<'a, T:'a> {
 }
 
 fn main() {
-    S { o: &None }; //~ ERROR unable to fully infer type(s) [E0282]
-                    //~| NOTE cannot infer type
-                    //~| NOTE type annotations or generic parameter binding
+    S { o: &None }; //~ ERROR type annotations needed [E0282]
+                    //~| NOTE cannot infer type for `T`
 }
diff --git a/src/test/compile-fail/vector-no-ann.rs b/src/test/compile-fail/vector-no-ann.rs
index d470f937190..de229ded463 100644
--- a/src/test/compile-fail/vector-no-ann.rs
+++ b/src/test/compile-fail/vector-no-ann.rs
@@ -11,8 +11,7 @@
 
 fn main() {
     let _foo = Vec::new();
-    //~^ ERROR unable to fully infer type(s) [E0282]
-    //~| NOTE cannot infer type
-    //~| NOTE annotating the type for the variable `_foo` would help
-    //~| NOTE type annotations or generic parameter binding
+    //~^ ERROR type annotations needed [E0282]
+    //~| NOTE cannot infer type for `T`
+    //~| NOTE consider giving `_foo` a type
 }