From 964a5fabb7e32ac2b53678497a359e6eba2d5261 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Sat, 27 Dec 2014 16:42:01 -0500 Subject: [PATCH] Update error messages in various compile-fail tests --- src/test/compile-fail/issue-15965.rs | 2 -- src/test/compile-fail/issue-18345.rs | 1 - src/test/compile-fail/issue-18532.rs | 1 - src/test/compile-fail/issue-18611.rs | 7 +++---- src/test/compile-fail/issue-19081.rs | 4 ++-- src/test/compile-fail/unsized4.rs | 1 + 6 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/test/compile-fail/issue-15965.rs b/src/test/compile-fail/issue-15965.rs index f3636edeaa58..08b896f387bb 100644 --- a/src/test/compile-fail/issue-15965.rs +++ b/src/test/compile-fail/issue-15965.rs @@ -12,8 +12,6 @@ fn main() { return { 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 c8b3463b0911..e93acb3f064a 100644 --- a/src/test/compile-fail/issue-18345.rs +++ b/src/test/compile-fail/issue-18345.rs @@ -15,7 +15,6 @@ 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 - //~| 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 ec44ab7b2770..9cf922ae9900 100644 --- a/src/test/compile-fail/issue-18532.rs +++ b/src/test/compile-fail/issue-18532.rs @@ -17,5 +17,4 @@ fn main() { (return)((),()); //~^ ERROR the type of this value must be known - //~| ERROR this function takes 1 parameter } diff --git a/src/test/compile-fail/issue-18611.rs b/src/test/compile-fail/issue-18611.rs index b2f204d74767..49eeccb2b0cf 100644 --- a/src/test/compile-fail/issue-18611.rs +++ b/src/test/compile-fail/issue-18611.rs @@ -10,10 +10,9 @@ #![feature(associated_types)] -fn add_state(op: - ::State -//~^ ERROR it is currently unsupported to access associated types except through a type parameter -) {} +fn add_state(op: ::State) { +//~^ ERROR the trait `HasState` is not implemented for the type `int` +} trait HasState { type State; diff --git a/src/test/compile-fail/issue-19081.rs b/src/test/compile-fail/issue-19081.rs index 613ec8acd413..2f42dbd77fd0 100644 --- a/src/test/compile-fail/issue-19081.rs +++ b/src/test/compile-fail/issue-19081.rs @@ -10,7 +10,7 @@ #![feature(associated_types)] -pub trait Hasher{ +pub trait Hasher { type State; fn hash>(&self, value: &T) -> u64; } -trait Hash { +pub trait Hash { fn hash(&self, state: &mut S); } diff --git a/src/test/compile-fail/unsized4.rs b/src/test/compile-fail/unsized4.rs index a66c1d85009c..253ec2a84ea5 100644 --- a/src/test/compile-fail/unsized4.rs +++ b/src/test/compile-fail/unsized4.rs @@ -11,6 +11,7 @@ // Test that bounds are sized-compatible. trait T {} + fn f() { //~^ERROR incompatible bounds on type parameter `Y`, bound `T` does not allow unsized type }