]> git.lizzy.rs Git - rust.git/commitdiff
Fix fallout
authorEdward Wang <edward.yu.wang@gmail.com>
Sat, 31 Jan 2015 18:57:26 +0000 (02:57 +0800)
committerEdward Wang <edward.yu.wang@gmail.com>
Sat, 31 Jan 2015 20:06:18 +0000 (04:06 +0800)
src/test/compile-fail/associated-types-ICE-when-projecting-out-of-err.rs
src/test/compile-fail/issue-2149.rs

index 183781e9e241723c21b476f888e97536cbfcabb0..b35d5131c781aa24f9a5354754b74d68a922c678 100644 (file)
@@ -29,6 +29,6 @@ trait Add<RHS=Self> {
 
 fn ice<A>(a: A) {
     let r = loop {};
-    r = r + a; // here the type `r` is not yet inferred, hence `r+a` generates an error.
-    //~^ ERROR type of this value must be known
+    r = r + a;
+    //~^ ERROR binary operation `+` cannot be applied to type `A`
 }
index 691660f897157f309dfcb52a2e3420b4db1dd729..4852dfc9a02bc7cc5f2312a5ca32191fba39491a 100644 (file)
@@ -16,7 +16,7 @@ impl<A> vec_monad<A> for Vec<A> {
     fn bind<B, F>(&self, mut f: F) where F: FnMut(A) -> Vec<B> {
         let mut r = panic!();
         for elt in self.iter() { r = r + f(*elt); }
-        //~^ ERROR the type of this value must be known
+        //~^ ERROR binary operation `+` cannot be applied to type `collections::vec::Vec<B>`
    }
 }
 fn main() {