Skip to content

Commit 91b1c55

Browse files
committed
test: Wrap long expected compile-fail messages for E0282
1 parent cf75446 commit 91b1c55

5 files changed

+10
-5
lines changed

src/test/compile-fail/issue-12028.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ trait StreamHash<H: StreamHasher>: Hash<H> {
3636
impl<H: StreamHasher> Hash<H> for u8 {
3737
fn hash2(&self, hasher: &H) -> u64 {
3838
let mut stream = hasher.stream();
39-
self.input_stream(&mut stream); //~ ERROR type annotations or generic parameter binding required
39+
self.input_stream(&mut stream);
40+
//~^ ERROR type annotations or generic parameter binding required
4041
Stream::result(&stream)
4142
}
4243
}

src/test/compile-fail/issue-6458.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ pub struct MyState;
1616
pub fn foo<State>(_: TypeWithState<State>) {}
1717

1818
pub fn bar() {
19-
foo(TypeWithState(marker::PhantomData)); //~ ERROR type annotations or generic parameter binding required
19+
foo(TypeWithState(marker::PhantomData));
20+
//~^ ERROR type annotations or generic parameter binding required
2021
}
2122

2223
fn main() {

src/test/compile-fail/method-ambig-one-trait-unknown-int-type.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ impl foo for Vec<isize> {
3131

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

src/test/compile-fail/traits-multidispatch-convert-ambig-dest.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ where T : Convert<U>
3333
}
3434

3535
fn a() {
36-
test(22, std::default::Default::default()); //~ ERROR type annotations or generic parameter binding required
36+
test(22, std::default::Default::default());
37+
//~^ ERROR type annotations or generic parameter binding required
3738
}
3839

3940
fn main() {}

src/test/compile-fail/vector-no-ann.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010

1111

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

0 commit comments

Comments
 (0)