Update error messages in various compile-fail tests
This commit is contained in:
parent
b7c6e317b0
commit
964a5fabb7
6 changed files with 6 additions and 10 deletions
|
|
@ -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
|
||||
()
|
||||
;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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() {}
|
||||
|
|
|
|||
|
|
@ -17,5 +17,4 @@
|
|||
fn main() {
|
||||
(return)((),());
|
||||
//~^ ERROR the type of this value must be known
|
||||
//~| ERROR this function takes 1 parameter
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,10 +10,9 @@
|
|||
|
||||
#![feature(associated_types)]
|
||||
|
||||
fn add_state(op:
|
||||
<int as HasState>::State
|
||||
//~^ ERROR it is currently unsupported to access associated types except through a type parameter
|
||||
) {}
|
||||
fn add_state(op: <int as HasState>::State) {
|
||||
//~^ ERROR the trait `HasState` is not implemented for the type `int`
|
||||
}
|
||||
|
||||
trait HasState {
|
||||
type State;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#![feature(associated_types)]
|
||||
|
||||
pub trait Hasher{
|
||||
pub trait Hasher {
|
||||
type State;
|
||||
|
||||
fn hash<T: Hash<
|
||||
|
|
@ -18,7 +18,7 @@ pub trait Hasher{
|
|||
>>(&self, value: &T) -> u64;
|
||||
}
|
||||
|
||||
trait Hash<S> {
|
||||
pub trait Hash<S> {
|
||||
fn hash(&self, state: &mut S);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
// Test that bounds are sized-compatible.
|
||||
|
||||
trait T {}
|
||||
|
||||
fn f<Sized? Y: T>() {
|
||||
//~^ERROR incompatible bounds on type parameter `Y`, bound `T` does not allow unsized type
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue