]> git.lizzy.rs Git - rust.git/commitdiff
Reword note about missing trait implementation
authorFlorian Hahn <flo@fhahn.com>
Sun, 11 Oct 2015 22:25:50 +0000 (00:25 +0200)
committerFlorian Hahn <flo@fhahn.com>
Tue, 13 Oct 2015 07:59:46 +0000 (09:59 +0200)
src/librustc_typeck/check/op.rs
src/test/compile-fail/issue-28837.rs

index b00535c9610faf65d715e3d66a8149931691115f..0c65f68f02e3e8fac792447de3f95495271511d6 100644 (file)
@@ -209,8 +209,7 @@ fn check_overloaded_binop<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
 
                     if let Some(missing_trait) = missing_trait {
                         span_note!(fcx.tcx().sess, lhs_expr.span,
-                                   "an implementation of `{}` might be missing for `{}` \
-                                    or one of its type arguments",
+                                   "an implementation of `{}` might be missing for `{}`",
                                     missing_trait, lhs_ty);
                     }
                 }
index 6baaebc32449994ce662657d436d358c838922a2..c7cf63bf2c46693c11aca1c6af234757424072a3 100644 (file)
 fn main() {
     let a = A;
 
-    a + a; //~ ERROR binary operation `+` cannot be applied to type `A` 
-    //~^ NOTE an implementation of `std::ops::Add` might be missing for `A` or
+    a + a; //~ ERROR binary operation `+` cannot be applied to type `A`
+    //~^ NOTE an implementation of `std::ops::Add` might be missing for `A`
 
     a - a; //~ ERROR binary operation `-` cannot be applied to type `A`
-    //~^ NOTE an implementation of `std::ops::Sub` might be missing for `A` or one of
+    //~^ NOTE an implementation of `std::ops::Sub` might be missing for `A`
 
     a * a; //~ ERROR binary operation `*` cannot be applied to type `A`
-    //~^ NOTE an implementation of `std::ops::Mul` might be missing for `A` or one of
+    //~^ NOTE an implementation of `std::ops::Mul` might be missing for `A`
 
     a / a; //~ ERROR binary operation `/` cannot be applied to type `A`
-    //~^ NOTE an implementation of `std::ops::Div` might be missing for `A` or one of
+    //~^ NOTE an implementation of `std::ops::Div` might be missing for `A`
 
     a % a; //~ ERROR binary operation `%` cannot be applied to type `A`
-    //~^ NOTE an implementation of `std::ops::Rem` might be missing for `A` or one of
+    //~^ NOTE an implementation of `std::ops::Rem` might be missing for `A`
 
     a & a; //~ ERROR binary operation `&` cannot be applied to type `A`
-    //~^ NOTE an implementation of `std::ops::BitAnd` might be missing for `A` or one of
+    //~^ NOTE an implementation of `std::ops::BitAnd` might be missing for `A`
 
     a | a; //~ ERROR binary operation `|` cannot be applied to type `A`
-    //~^ NOTE an implementation of `std::ops::BitOr` might be missing for `A` or one of
+    //~^ NOTE an implementation of `std::ops::BitOr` might be missing for `A`
 
     a << a; //~ ERROR binary operation `<<` cannot be applied to type `A`
-    //~^ NOTE an implementation of `std::ops::Shl` might be missing for `A` or one of
+    //~^ NOTE an implementation of `std::ops::Shl` might be missing for `A`
 
     a >> a; //~ ERROR binary operation `>>` cannot be applied to type `A`
-    //~^ NOTE an implementation of `std::ops::Shr` might be missing for `A` or one of
+    //~^ NOTE an implementation of `std::ops::Shr` might be missing for `A`
 
     a == a; //~ ERROR binary operation `==` cannot be applied to type `A`
-    //~^ NOTE an implementation of `std::cmp::PartialEq` might be missing for `A` or one of
+    //~^ NOTE an implementation of `std::cmp::PartialEq` might be missing for `A`
 
     a != a; //~ ERROR binary operation `!=` cannot be applied to type `A`
-    //~^ NOTE an implementation of `std::cmp::PartialEq` might be missing for `A` or one of
+    //~^ NOTE an implementation of `std::cmp::PartialEq` might be missing for `A`
 
     a < a; //~ ERROR binary operation `<` cannot be applied to type `A`
-    //~^ NOTE an implementation of `std::cmp::PartialOrd` might be missing for `A` or one of
+    //~^ NOTE an implementation of `std::cmp::PartialOrd` might be missing for `A`
 
     a <= a; //~ ERROR binary operation `<=` cannot be applied to type `A`
-    //~^ NOTE an implementation of `std::cmp::PartialOrd` might be missing for `A` or one of
+    //~^ NOTE an implementation of `std::cmp::PartialOrd` might be missing for `A`
 
     a > a; //~ ERROR binary operation `>` cannot be applied to type `A`
-    //~^ NOTE an implementation of `std::cmp::PartialOrd` might be missing for `A` or one of
+    //~^ NOTE an implementation of `std::cmp::PartialOrd` might be missing for `A`
 
     a >= a; //~ ERROR binary operation `>=` cannot be applied to type `A`
-    //~^ NOTE an implementation of `std::cmp::PartialOrd` might be missing for `A` or one of
+    //~^ NOTE an implementation of `std::cmp::PartialOrd` might be missing for `A`
 }