Skip to content

Commit cf75446

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

18 files changed

+36
-36
lines changed

src/test/compile-fail/associated-types-unconstrained.rs

Lines changed: 2 additions & 2 deletions
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
//
@@ -22,5 +22,5 @@ impl Foo for isize {
2222

2323
pub fn main() {
2424
let x: isize = Foo::bar();
25-
//~^ ERROR type annotations required
25+
//~^ ERROR type annotations or generic parameter binding required
2626
}

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

Lines changed: 2 additions & 2 deletions
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
//
@@ -36,7 +36,7 @@ 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 required
39+
self.input_stream(&mut stream); //~ ERROR type annotations or generic parameter binding required
4040
Stream::result(&stream)
4141
}
4242
}

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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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-16966.rs

Lines changed: 2 additions & 2 deletions
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
//
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// error-pattern:type annotations required
11+
// error-pattern:type annotations or generic parameter binding required
1212
fn main() {
1313
panic!(
1414
std::default::Default::default()

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

Lines changed: 2 additions & 2 deletions
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
//
@@ -21,7 +21,7 @@ fn foo<'a,'b,T>(x: &'a T, y: &'b T)
2121
where &'a T : Foo,
2222
&'b T : Foo
2323
{
24-
x.foo(); //~ ERROR type annotations required
24+
x.foo(); //~ ERROR type annotations or generic parameter binding required
2525
y.foo();
2626
}
2727

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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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,7 @@ 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)); //~ ERROR type annotations or generic parameter binding required
2020
}
2121

2222
fn main() {

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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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,7 @@ 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(); //~ ERROR type annotations or generic parameter binding required
3535
x.foo();
3636
}
3737

src/test/compile-fail/trait-static-method-generic-inference.rs

Lines changed: 2 additions & 2 deletions
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
//
@@ -32,7 +32,7 @@ mod base {
3232

3333
pub fn foo() {
3434
let _f: base::Foo = base::HasNew::new();
35-
//~^ ERROR type annotations required
35+
//~^ ERROR type annotations or generic parameter binding required
3636
}
3737

3838
fn main() { }

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

Lines changed: 2 additions & 2 deletions
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,7 @@ 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()); //~ ERROR type annotations or generic parameter binding required
3737
}
3838

3939
fn main() {}

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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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,5 @@
1010

1111

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

0 commit comments

Comments
 (0)