Skip to content

Commit

Permalink
Three random test cases that seem to produce more errors now. I've
Browse files Browse the repository at this point in the history
not dug deeply into what is going on here, although the errors ARE
somewhat surprising.
  • Loading branch information
nikomatsakis committed Dec 19, 2014
1 parent a04ce71 commit ebf1e4f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/test/compile-fail/issue-15965.rs
Expand Up @@ -10,7 +10,10 @@

fn main() {
return
{ return () } //~ ERROR the type of this value must be known in this context
{ return () }
//~^ ERROR the type of this value must be known in this context
//~| ERROR this function takes 1 parameter
//~| ERROR mismatched types
()
;
}
4 changes: 3 additions & 1 deletion src/test/compile-fail/issue-18345.rs
Expand Up @@ -13,7 +13,9 @@ type Transducer<'t, R, T, U> = |Step<'t, R, U>|: 't -> Step<'t, R, T>;

fn mapping<'f, R, T, U>(f: |T|: 'f -> U) -> &'f Transducer<'f, R, T, U> {
|step| |r, x|
step(r, f(x)) //~ ERROR the type of this value must be known in this context
step(r, f(x))
//~^ ERROR the type of this value must be known in this context
//~| ERROR this function takes 1 parameter but 2 parameters were supplied
}

fn main() {}
1 change: 1 addition & 0 deletions src/test/compile-fail/issue-18532.rs
Expand Up @@ -17,4 +17,5 @@
fn main() {
(return)((),());
//~^ ERROR the type of this value must be known
//~| ERROR this function takes 1 parameter
}

2 comments on commit ebf1e4f

@nikomatsakis
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=pnkfelix p=1

@nikomatsakis
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors: retry

Please sign in to comment.