From ebf1e4f23adba8fc2a4441b8c2a7473c3a7c9d65 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Thu, 18 Dec 2014 22:17:16 -0500 Subject: [PATCH] Three random test cases that seem to produce more errors now. I've not dug deeply into what is going on here, although the errors ARE somewhat surprising. --- src/test/compile-fail/issue-15965.rs | 5 ++++- src/test/compile-fail/issue-18345.rs | 4 +++- src/test/compile-fail/issue-18532.rs | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/test/compile-fail/issue-15965.rs b/src/test/compile-fail/issue-15965.rs index 935e6770658..f3636edeaa5 100644 --- a/src/test/compile-fail/issue-15965.rs +++ b/src/test/compile-fail/issue-15965.rs @@ -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 () ; } diff --git a/src/test/compile-fail/issue-18345.rs b/src/test/compile-fail/issue-18345.rs index 298f155faff..c8b3463b091 100644 --- a/src/test/compile-fail/issue-18345.rs +++ b/src/test/compile-fail/issue-18345.rs @@ -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() {} diff --git a/src/test/compile-fail/issue-18532.rs b/src/test/compile-fail/issue-18532.rs index 9cf922ae990..ec44ab7b277 100644 --- a/src/test/compile-fail/issue-18532.rs +++ b/src/test/compile-fail/issue-18532.rs @@ -17,4 +17,5 @@ fn main() { (return)((),()); //~^ ERROR the type of this value must be known + //~| ERROR this function takes 1 parameter }