Skip to content

Commit 4b8098b

Browse files
committed
test: Update expected compile-fail message for E0282
1 parent 414dfb1 commit 4b8098b

13 files changed

+30
-26
lines changed

src/test/compile-fail/issue-12187-1.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -14,5 +14,5 @@ fn new<T>() -> &'static T {
1414

1515
fn main() {
1616
let &v = new();
17-
//~^ ERROR type annotations required
17+
//~^ ERROR type annotations or generic parameter binding required
1818
}

src/test/compile-fail/issue-12187-2.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -14,5 +14,5 @@ fn new<'r, T>() -> &'r T {
1414

1515
fn main() {
1616
let &v = new();
17-
//~^ ERROR type annotations required
17+
//~^ ERROR type annotations or generic parameter binding required
1818
}

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -9,4 +9,4 @@
99
// except according to those terms.
1010

1111
fn main() { format!("{:?}", None); }
12-
//~^ ERROR type annotations required
12+
//~^ ERROR type annotations or generic parameter binding required

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -11,5 +11,5 @@
1111
fn main() {
1212
// Unconstrained type:
1313
format!("{:?}", None);
14-
//~^ ERROR type annotations required
14+
//~^ ERROR type annotations or generic parameter binding required
1515
}

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -12,5 +12,5 @@ use std::mem;
1212

1313
fn main() {
1414
mem::transmute(0);
15-
//~^ ERROR type annotations required
15+
//~^ ERROR type annotations or generic parameter binding required
1616
}

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -10,7 +10,7 @@
1010

1111
fn foo(b: bool) -> Result<bool,String> {
1212
Err("bar".to_string());
13-
//~^ ERROR type annotations required
13+
//~^ ERROR type annotations or generic parameter binding required
1414
}
1515

1616
fn main() {

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -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 required
19+
foo(TypeWithState(marker::PhantomData));
20+
//~^ ERROR type annotations or generic parameter binding required
2021
}
2122

2223
fn main() {

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -10,5 +10,5 @@
1010

1111
fn main() {
1212
let v = &[];
13-
let it = v.iter(); //~ ERROR type annotations required
13+
let it = v.iter(); //~ ERROR type annotations or generic parameter binding required
1414
}

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -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 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

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -33,7 +33,8 @@ where T : Convert<U>
3333
}
3434

3535
fn a() {
36-
test(22, std::default::Default::default()); //~ ERROR type annotations 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/unconstrained-none.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -11,5 +11,5 @@
1111
// Issue #5062
1212

1313
fn main() {
14-
None; //~ ERROR type annotations required
14+
None; //~ ERROR type annotations or generic parameter binding required
1515
}

src/test/compile-fail/unconstrained-ref.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -13,5 +13,5 @@ struct S<'a, T:'a> {
1313
}
1414

1515
fn main() {
16-
S { o: &None }; //~ ERROR type annotations required
16+
S { o: &None }; //~ ERROR type annotations or generic parameter binding required
1717
}

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -10,5 +10,6 @@
1010

1111

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

0 commit comments

Comments
 (0)