Skip to content

Commit

Permalink
test: Wrap long expected compile-fail messages for E0282
Browse files Browse the repository at this point in the history
  • Loading branch information
ruuda committed May 5, 2015
1 parent cf75446 commit 91b1c55
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/test/compile-fail/issue-12028.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ trait StreamHash<H: StreamHasher>: Hash<H> {
impl<H: StreamHasher> Hash<H> for u8 {
fn hash2(&self, hasher: &H) -> u64 {
let mut stream = hasher.stream();
self.input_stream(&mut stream); //~ ERROR type annotations or generic parameter binding required
self.input_stream(&mut stream);
//~^ ERROR type annotations or generic parameter binding required
Stream::result(&stream)
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/test/compile-fail/issue-6458.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ pub struct MyState;
pub fn foo<State>(_: TypeWithState<State>) {}

pub fn bar() {
foo(TypeWithState(marker::PhantomData)); //~ ERROR type annotations or generic parameter binding required
foo(TypeWithState(marker::PhantomData));
//~^ ERROR type annotations or generic parameter binding required
}

fn main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ impl foo for Vec<isize> {

fn m1() {
// we couldn't infer the type of the vector just based on calling foo()...
let mut x = Vec::new(); //~ ERROR type annotations or generic parameter binding required
let mut x = Vec::new();
//~^ ERROR type annotations or generic parameter binding required
x.foo();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ where T : Convert<U>
}

fn a() {
test(22, std::default::Default::default()); //~ ERROR type annotations or generic parameter binding required
test(22, std::default::Default::default());
//~^ ERROR type annotations or generic parameter binding required
}

fn main() {}
3 changes: 2 additions & 1 deletion src/test/compile-fail/vector-no-ann.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@


fn main() {
let _foo = Vec::new(); //~ ERROR type annotations or generic parameter binding required
let _foo = Vec::new();
//~^ ERROR type annotations or generic parameter binding required
}

0 comments on commit 91b1c55

Please sign in to comment.