about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeSeulArtichaut <leseulartichaut@gmail.com>2019-12-11 23:11:32 +0100
committerLeSeulArtichaut <leseulartichaut@gmail.com>2019-12-12 20:56:14 +0100
commiteac6fac10b572d4912d0bcd455c12909f63914b7 (patch)
tree5a3620cace948a87da14c57a3631a09b7dd77e1a
parent27810e246c89777f39441d6cc050e540cb2e54e0 (diff)
downloadrust-eac6fac10b572d4912d0bcd455c12909f63914b7.tar.gz
rust-eac6fac10b572d4912d0bcd455c12909f63914b7.zip
Update tests
-rw-r--r--src/test/ui/autoderef-full-lval.rs4
-rw-r--r--src/test/ui/binary-op-on-double-ref.rs2
-rw-r--r--src/test/ui/binop/binop-bitxor-str.rs2
-rw-r--r--src/test/ui/binop/binop-mul-bool.rs2
-rw-r--r--src/test/ui/binop/binop-typeck.rs2
-rw-r--r--src/test/ui/for/for-loop-type-error.rs2
-rw-r--r--src/test/ui/issues/issue-14915.rs2
-rw-r--r--src/test/ui/issues/issue-24363.rs2
-rw-r--r--src/test/ui/issues/issue-28837.rs18
-rw-r--r--src/test/ui/issues/issue-31076.rs4
-rw-r--r--src/test/ui/issues/issue-35668.rs2
-rw-r--r--src/test/ui/issues/issue-3820.rs2
-rw-r--r--src/test/ui/issues/issue-40610.rs2
-rw-r--r--src/test/ui/issues/issue-41394.rs2
-rw-r--r--src/test/ui/or-patterns/or-patterns-syntactic-fail.rs2
-rw-r--r--src/test/ui/pattern/pattern-tyvar-2.rs2
-rw-r--r--src/test/ui/span/issue-39018.rs26
-rw-r--r--src/test/ui/str/str-concat-on-double-ref.rs2
-rw-r--r--src/test/ui/terminal-width/non-1-width-unicode-multiline-label.rs2
-rw-r--r--src/test/ui/traits/trait-resolution-in-overloaded-op.rs2
-rw-r--r--src/test/ui/type/type-check/missing_trait_impl.rs2
-rw-r--r--src/test/ui/vec/vec-res-add.rs2
22 files changed, 44 insertions, 44 deletions
diff --git a/src/test/ui/autoderef-full-lval.rs b/src/test/ui/autoderef-full-lval.rs
index db09d036ad3..4bef1012e33 100644
--- a/src/test/ui/autoderef-full-lval.rs
+++ b/src/test/ui/autoderef-full-lval.rs
@@ -13,13 +13,13 @@ fn main() {
     let a: Clam = Clam{x: box 1, y: box 2};
     let b: Clam = Clam{x: box 10, y: box 20};
     let z: isize = a.x + b.y;
-    //~^ ERROR binary operation `+` cannot be applied to type `std::boxed::Box<isize>`
+    //~^ ERROR cannot add `std::boxed::Box<isize>` to `std::boxed::Box<isize>`
     println!("{}", z);
     assert_eq!(z, 21);
     let forty: Fish = Fish{a: box 40};
     let two: Fish = Fish{a: box 2};
     let answer: isize = forty.a + two.a;
-    //~^ ERROR binary operation `+` cannot be applied to type `std::boxed::Box<isize>`
+    //~^ ERROR cannot add `std::boxed::Box<isize>` to `std::boxed::Box<isize>`
     println!("{}", answer);
     assert_eq!(answer, 42);
 }
diff --git a/src/test/ui/binary-op-on-double-ref.rs b/src/test/ui/binary-op-on-double-ref.rs
index 6490cc7fe56..67e01b9327d 100644
--- a/src/test/ui/binary-op-on-double-ref.rs
+++ b/src/test/ui/binary-op-on-double-ref.rs
@@ -2,7 +2,7 @@ fn main() {
     let v = vec![1, 2, 3, 4, 5, 6, 7, 8, 9];
     let vr = v.iter().filter(|x| {
         x % 2 == 0
-        //~^ ERROR binary operation `%` cannot be applied to type `&&{integer}`
+        //~^ ERROR cannot mod `&&{integer}` by `{integer}`
     });
     println!("{:?}", vr);
 }
diff --git a/src/test/ui/binop/binop-bitxor-str.rs b/src/test/ui/binop/binop-bitxor-str.rs
index 6021c344dfb..e98ea4df97d 100644
--- a/src/test/ui/binop/binop-bitxor-str.rs
+++ b/src/test/ui/binop/binop-bitxor-str.rs
@@ -1,3 +1,3 @@
-// error-pattern:`^` cannot be applied to type `std::string::String`
+// error-pattern:no implementation for `std::string::String ^ std::string::String`
 
 fn main() { let x = "a".to_string() ^ "b".to_string(); }
diff --git a/src/test/ui/binop/binop-mul-bool.rs b/src/test/ui/binop/binop-mul-bool.rs
index 3d5349ba880..27b2f8bb3ff 100644
--- a/src/test/ui/binop/binop-mul-bool.rs
+++ b/src/test/ui/binop/binop-mul-bool.rs
@@ -1,3 +1,3 @@
-// error-pattern:`*` cannot be applied to type `bool`
+// error-pattern:cannot multiply `bool` to `bool`
 
 fn main() { let x = true * false; }
diff --git a/src/test/ui/binop/binop-typeck.rs b/src/test/ui/binop/binop-typeck.rs
index e1185cfba26..812fe95db4e 100644
--- a/src/test/ui/binop/binop-typeck.rs
+++ b/src/test/ui/binop/binop-typeck.rs
@@ -4,5 +4,5 @@ fn main() {
     let x = true;
     let y = 1;
     let z = x + y;
-    //~^ ERROR binary operation `+` cannot be applied to type `bool`
+    //~^ ERROR cannot add `{integer}` to `bool`
 }
diff --git a/src/test/ui/for/for-loop-type-error.rs b/src/test/ui/for/for-loop-type-error.rs
index 879fa47549e..8d9fc20f0d0 100644
--- a/src/test/ui/for/for-loop-type-error.rs
+++ b/src/test/ui/for/for-loop-type-error.rs
@@ -1,5 +1,5 @@
 pub fn main() {
-    let x = () + (); //~ ERROR binary operation
+    let x = () + (); //~ ERROR cannot add `()` to `()`
 
     // this shouldn't have a flow-on error:
     for _ in x {}
diff --git a/src/test/ui/issues/issue-14915.rs b/src/test/ui/issues/issue-14915.rs
index 294533f0cbb..4acb51a4e50 100644
--- a/src/test/ui/issues/issue-14915.rs
+++ b/src/test/ui/issues/issue-14915.rs
@@ -4,5 +4,5 @@ fn main() {
     let x: Box<isize> = box 0;
 
     println!("{}", x + 1);
-    //~^ ERROR binary operation `+` cannot be applied to type `std::boxed::Box<isize>`
+    //~^ ERROR cannot add `{integer}` to `std::boxed::Box<isize>`
 }
diff --git a/src/test/ui/issues/issue-24363.rs b/src/test/ui/issues/issue-24363.rs
index a5b45f13e74..34726fba9c6 100644
--- a/src/test/ui/issues/issue-24363.rs
+++ b/src/test/ui/issues/issue-24363.rs
@@ -1,6 +1,6 @@
 fn main() {
     1.create_a_type_error[ //~ `{integer}` is a primitive type and therefore doesn't have fields
-        ()+() //~ ERROR binary operation `+` cannot be applied
+        ()+() //~ ERROR cannot add
               //   ^ ensure that we typeck the inner expression ^
     ];
 }
diff --git a/src/test/ui/issues/issue-28837.rs b/src/test/ui/issues/issue-28837.rs
index 114473f3acf..438a4c521b1 100644
--- a/src/test/ui/issues/issue-28837.rs
+++ b/src/test/ui/issues/issue-28837.rs
@@ -3,23 +3,23 @@ struct A;
 fn main() {
     let a = A;
 
-    a + a; //~ ERROR binary operation `+` cannot be applied to type `A`
+    a + a; //~ ERROR cannot add `A` to `A`
 
-    a - a; //~ ERROR binary operation `-` cannot be applied to type `A`
+    a - a; //~ ERROR cannot substract `A` from `A`
 
-    a * a; //~ ERROR binary operation `*` cannot be applied to type `A`
+    a * a; //~ ERROR cannot multiply `A` to `A`
 
-    a / a; //~ ERROR binary operation `/` cannot be applied to type `A`
+    a / a; //~ ERROR cannot divide `A` by `A`
 
-    a % a; //~ ERROR binary operation `%` cannot be applied to type `A`
+    a % a; //~ ERROR cannot mod `A` by `A`
 
-    a & a; //~ ERROR binary operation `&` cannot be applied to type `A`
+    a & a; //~ ERROR no implementation for `A & A`
 
-    a | a; //~ ERROR binary operation `|` cannot be applied to type `A`
+    a | a; //~ ERROR no implementation for `A | A`
 
-    a << a; //~ ERROR binary operation `<<` cannot be applied to type `A`
+    a << a; //~ ERROR no implementation for `A << A`
 
-    a >> a; //~ ERROR binary operation `>>` cannot be applied to type `A`
+    a >> a; //~ ERROR no implementation for `A >> A`
 
     a == a; //~ ERROR binary operation `==` cannot be applied to type `A`
 
diff --git a/src/test/ui/issues/issue-31076.rs b/src/test/ui/issues/issue-31076.rs
index e4531072e9b..f9c35526ec3 100644
--- a/src/test/ui/issues/issue-31076.rs
+++ b/src/test/ui/issues/issue-31076.rs
@@ -11,7 +11,7 @@ impl Add<i32> for i32 {}
 
 fn main() {
     let x = 5 + 6;
-    //~^ ERROR binary operation `+` cannot be applied to type `{integer}`
+    //~^ ERROR cannot add `{integer}` to `{integer}`
     let y = 5i32 + 6i32;
-    //~^ ERROR binary operation `+` cannot be applied to type `i32`
+    //~^ ERROR cannot add `i32` to `i32`
 }
diff --git a/src/test/ui/issues/issue-35668.rs b/src/test/ui/issues/issue-35668.rs
index 1b8ada57ed6..6f6dfb00f86 100644
--- a/src/test/ui/issues/issue-35668.rs
+++ b/src/test/ui/issues/issue-35668.rs
@@ -1,6 +1,6 @@
 fn func<'a, T>(a: &'a [T]) -> impl Iterator<Item=&'a T> {
     a.iter().map(|a| a*a)
-    //~^ ERROR binary operation `*` cannot be applied to type `&T`
+    //~^ ERROR cannot multiply `&T` to `&T`
 }
 
 fn main() {
diff --git a/src/test/ui/issues/issue-3820.rs b/src/test/ui/issues/issue-3820.rs
index fbf60ce278d..c0906546232 100644
--- a/src/test/ui/issues/issue-3820.rs
+++ b/src/test/ui/issues/issue-3820.rs
@@ -11,5 +11,5 @@ impl Thing {
 fn main() {
     let u = Thing {x: 2};
     let _v = u.mul(&3); // This is ok
-    let w = u * 3; //~ ERROR binary operation `*` cannot be applied to type `Thing`
+    let w = u * 3; //~ ERROR cannot multiply `{integer}` to `Thing`
 }
diff --git a/src/test/ui/issues/issue-40610.rs b/src/test/ui/issues/issue-40610.rs
index 104cf7f54e5..c01233605b5 100644
--- a/src/test/ui/issues/issue-40610.rs
+++ b/src/test/ui/issues/issue-40610.rs
@@ -2,5 +2,5 @@ fn f(_: &[f32]) {}
 
 fn main() {
     () + f(&[1.0]);
-    //~^ ERROR binary operation `+` cannot be applied to type `()`
+    //~^ ERROR cannot add `()` to `()`
 }
diff --git a/src/test/ui/issues/issue-41394.rs b/src/test/ui/issues/issue-41394.rs
index 45318f6efb8..64873ac35a0 100644
--- a/src/test/ui/issues/issue-41394.rs
+++ b/src/test/ui/issues/issue-41394.rs
@@ -1,6 +1,6 @@
 enum Foo {
     A = "" + 1
-    //~^ ERROR binary operation `+` cannot be applied to type `&str`
+    //~^ ERROR cannot add `{integer}` to `&str`
 }
 
 enum Bar {
diff --git a/src/test/ui/or-patterns/or-patterns-syntactic-fail.rs b/src/test/ui/or-patterns/or-patterns-syntactic-fail.rs
index b676ea851a3..ce6836f30f9 100644
--- a/src/test/ui/or-patterns/or-patterns-syntactic-fail.rs
+++ b/src/test/ui/or-patterns/or-patterns-syntactic-fail.rs
@@ -21,7 +21,7 @@ use E::*;
 
 fn no_top_level_or_patterns() {
     // We do *not* allow or-patterns at the top level of lambdas...
-    let _ = |A | B: E| (); //~ ERROR binary operation `|` cannot be applied to type `E`
+    let _ = |A | B: E| (); //~ ERROR no implementation for `E | ()`
     //           -------- This looks like an or-pattern but is in fact `|A| (B: E | ())`.
 
     // ...and for now neither do we allow or-patterns at the top level of functions.
diff --git a/src/test/ui/pattern/pattern-tyvar-2.rs b/src/test/ui/pattern/pattern-tyvar-2.rs
index 9fba9cb876a..4c6d515b86a 100644
--- a/src/test/ui/pattern/pattern-tyvar-2.rs
+++ b/src/test/ui/pattern/pattern-tyvar-2.rs
@@ -1,6 +1,6 @@
 enum Bar { T1((), Option<Vec<isize>>), T2, }
 
 fn foo(t: Bar) -> isize { match t { Bar::T1(_, Some(x)) => { return x * 3; } _ => { panic!(); } } }
-//~^ ERROR binary operation `*` cannot be applied to
+//~^ ERROR cannot multiply `{integer}` to `std::vec::Vec<isize>`
 
 fn main() { }
diff --git a/src/test/ui/span/issue-39018.rs b/src/test/ui/span/issue-39018.rs
index a3b1d1d8179..b6db4008db0 100644
--- a/src/test/ui/span/issue-39018.rs
+++ b/src/test/ui/span/issue-39018.rs
@@ -1,15 +1,15 @@
 pub fn main() {
     let x = "Hello " + "World!";
-    //~^ ERROR cannot be applied to type
+    //~^ ERROR cannot add
 
     // Make sure that the span outputs a warning
     // for not having an implementation for std::ops::Add
     // that won't output for the above string concatenation
     let y = World::Hello + World::Goodbye;
-    //~^ ERROR cannot be applied to type
+    //~^ ERROR cannot add
 
     let x = "Hello " + "World!".to_owned();
-    //~^ ERROR cannot be applied to type
+    //~^ ERROR cannot add
 }
 
 enum World {
@@ -23,16 +23,16 @@ fn foo() {
     let c = "";
     let d = "";
     let e = &a;
-    let _ = &a + &b; //~ ERROR binary operation
-    let _ = &a + b; //~ ERROR binary operation
+    let _ = &a + &b; //~ ERROR cannot add
+    let _ = &a + b; //~ ERROR cannot add
     let _ = a + &b; // ok
     let _ = a + b; //~ ERROR mismatched types
-    let _ = e + b; //~ ERROR binary operation
-    let _ = e + &b; //~ ERROR binary operation
-    let _ = e + d; //~ ERROR binary operation
-    let _ = e + &d; //~ ERROR binary operation
-    let _ = &c + &d; //~ ERROR binary operation
-    let _ = &c + d; //~ ERROR binary operation
-    let _ = c + &d; //~ ERROR binary operation
-    let _ = c + d; //~ ERROR binary operation
+    let _ = e + b; //~ ERROR cannot add
+    let _ = e + &b; //~ ERROR cannot add
+    let _ = e + d; //~ ERROR cannot add
+    let _ = e + &d; //~ ERROR cannot add
+    let _ = &c + &d; //~ ERROR cannot add
+    let _ = &c + d; //~ ERROR cannot add
+    let _ = c + &d; //~ ERROR cannot add
+    let _ = c + d; //~ ERROR cannot add
 }
diff --git a/src/test/ui/str/str-concat-on-double-ref.rs b/src/test/ui/str/str-concat-on-double-ref.rs
index a671b6e191e..23e5f892062 100644
--- a/src/test/ui/str/str-concat-on-double-ref.rs
+++ b/src/test/ui/str/str-concat-on-double-ref.rs
@@ -2,6 +2,6 @@ fn main() {
     let a: &String = &"1".to_owned();
     let b: &str = &"2";
     let c = a + b;
-    //~^ ERROR binary operation `+` cannot be applied to type `&std::string::String`
+    //~^ ERROR cannot add `&str` to `&std::string::String`
     println!("{:?}", c);
 }
diff --git a/src/test/ui/terminal-width/non-1-width-unicode-multiline-label.rs b/src/test/ui/terminal-width/non-1-width-unicode-multiline-label.rs
index cc94680530c..1989ea88635 100644
--- a/src/test/ui/terminal-width/non-1-width-unicode-multiline-label.rs
+++ b/src/test/ui/terminal-width/non-1-width-unicode-multiline-label.rs
@@ -3,5 +3,5 @@
 fn main() {
     let unicode_is_fun = "؁‱ஹ௸௵꧄.ဪ꧅⸻𒈙𒐫﷽𒌄𒈟𒍼𒁎𒀱𒌧𒅃 𒈓𒍙𒊎𒄡𒅌𒁏𒀰𒐪𒐩𒈙𒐫𪚥";
     let _ = "ༀ༁༂༃༄༅༆༇༈༉༊་༌།༎༏༐༑༒༓༔༕༖༗༘༙༚༛༜༝༞༟༠༡༢༣༤༥༦༧༨༩༪༫༬༭༮༯༰༱༲༳༴༵༶༷༸༹༺༻༼༽༾༿ཀཁགགྷངཅཆཇ཈ཉཊཋཌཌྷཎཏཐདདྷནཔཕབབྷམཙཚཛཛྷཝཞཟའཡརལཤཥསཧཨཀྵཪཫཬ཭཮཯཰ཱཱཱིིུུྲྀཷླྀཹེཻོཽཾཿ྄ཱྀྀྂྃ྅྆྇ྈྉྊྋྌྍྎྏྐྑྒྒྷྔྕྖྗ྘ྙྚྛྜྜྷྞྟྠྡྡྷྣྤྥྦྦྷྨྩྪྫྫྷྭྮྯྰྱྲླྴྵྶྷྸྐྵྺྻྼ྽྾྿࿀࿁࿂࿃࿄࿅࿆࿇࿈࿉࿊࿋࿌࿍࿎࿏࿐࿑࿒࿓࿔࿕࿖࿗࿘࿙࿚"; let _a = unicode_is_fun + " really fun!";
-    //~^ ERROR binary operation `+` cannot be applied to type `&str`
+    //~^ ERROR cannot add `&str` to `&str`
 }
diff --git a/src/test/ui/traits/trait-resolution-in-overloaded-op.rs b/src/test/ui/traits/trait-resolution-in-overloaded-op.rs
index 96f81a21a3b..28677698516 100644
--- a/src/test/ui/traits/trait-resolution-in-overloaded-op.rs
+++ b/src/test/ui/traits/trait-resolution-in-overloaded-op.rs
@@ -5,7 +5,7 @@ trait MyMul<Rhs, Res> {
 }
 
 fn foo<T: MyMul<f64, f64>>(a: &T, b: f64) -> f64 {
-    a * b //~ ERROR binary operation `*` cannot be applied to type `&T`
+    a * b //~ ERROR cannot multiply `f64` to `&T`
 }
 
 fn main() {}
diff --git a/src/test/ui/type/type-check/missing_trait_impl.rs b/src/test/ui/type/type-check/missing_trait_impl.rs
index dcca96b509b..f61ada3f63f 100644
--- a/src/test/ui/type/type-check/missing_trait_impl.rs
+++ b/src/test/ui/type/type-check/missing_trait_impl.rs
@@ -2,7 +2,7 @@ fn main() {
 }
 
 fn foo<T>(x: T, y: T) {
-    let z = x + y; //~ ERROR binary operation `+` cannot be applied to type `T`
+    let z = x + y; //~ ERROR cannot add `T` to `T`
 }
 
 fn bar<T>(x: T) {
diff --git a/src/test/ui/vec/vec-res-add.rs b/src/test/ui/vec/vec-res-add.rs
index ea2aa6cda24..4785178fb25 100644
--- a/src/test/ui/vec/vec-res-add.rs
+++ b/src/test/ui/vec/vec-res-add.rs
@@ -14,6 +14,6 @@ fn main() {
     let i = vec![r(0)];
     let j = vec![r(1)];
     let k = i + j;
-    //~^ ERROR binary operation `+` cannot be applied to type
+    //~^ ERROR cannot add `std::vec::Vec<R>` to `std::vec::Vec<R>`
     println!("{:?}", j);
 }