Skip to content

Commit

Permalink
Fix fallout
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardw committed Jan 31, 2015
1 parent 1935bbd commit 60fa1ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -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`
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-2149.rs
Expand Up @@ -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() {
Expand Down

0 comments on commit 60fa1ff

Please sign in to comment.