test: Update expected compile-fail message for E0282
This commit is contained in:
parent
414dfb13df
commit
4b8098bb19
@ -1,4 +1,4 @@
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
@ -14,5 +14,5 @@ fn new<T>() -> &'static T {
|
||||
|
||||
fn main() {
|
||||
let &v = new();
|
||||
//~^ ERROR type annotations required
|
||||
//~^ ERROR type annotations or generic parameter binding required
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
@ -14,5 +14,5 @@ fn new<'r, T>() -> &'r T {
|
||||
|
||||
fn main() {
|
||||
let &v = new();
|
||||
//~^ ERROR type annotations required
|
||||
//~^ ERROR type annotations or generic parameter binding required
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
@ -9,4 +9,4 @@
|
||||
// except according to those terms.
|
||||
|
||||
fn main() { format!("{:?}", None); }
|
||||
//~^ ERROR type annotations required
|
||||
//~^ ERROR type annotations or generic parameter binding required
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
@ -11,5 +11,5 @@
|
||||
fn main() {
|
||||
// Unconstrained type:
|
||||
format!("{:?}", None);
|
||||
//~^ ERROR type annotations required
|
||||
//~^ ERROR type annotations or generic parameter binding required
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
@ -12,5 +12,5 @@ use std::mem;
|
||||
|
||||
fn main() {
|
||||
mem::transmute(0);
|
||||
//~^ ERROR type annotations required
|
||||
//~^ ERROR type annotations or generic parameter binding required
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
fn foo(b: bool) -> Result<bool,String> {
|
||||
Err("bar".to_string());
|
||||
//~^ ERROR type annotations required
|
||||
//~^ ERROR type annotations or generic parameter binding required
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
@ -16,7 +16,8 @@ pub struct MyState;
|
||||
pub fn foo<State>(_: TypeWithState<State>) {}
|
||||
|
||||
pub fn bar() {
|
||||
foo(TypeWithState(marker::PhantomData)); //~ ERROR type annotations required
|
||||
foo(TypeWithState(marker::PhantomData));
|
||||
//~^ ERROR type annotations or generic parameter binding required
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
@ -10,5 +10,5 @@
|
||||
|
||||
fn main() {
|
||||
let v = &[];
|
||||
let it = v.iter(); //~ ERROR type annotations required
|
||||
let it = v.iter(); //~ ERROR type annotations or generic parameter binding required
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
@ -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 required
|
||||
let mut x = Vec::new();
|
||||
//~^ ERROR type annotations or generic parameter binding required
|
||||
x.foo();
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
@ -33,7 +33,8 @@ where T : Convert<U>
|
||||
}
|
||||
|
||||
fn a() {
|
||||
test(22, std::default::Default::default()); //~ ERROR type annotations required
|
||||
test(22, std::default::Default::default());
|
||||
//~^ ERROR type annotations or generic parameter binding required
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
@ -11,5 +11,5 @@
|
||||
// Issue #5062
|
||||
|
||||
fn main() {
|
||||
None; //~ ERROR type annotations required
|
||||
None; //~ ERROR type annotations or generic parameter binding required
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
@ -13,5 +13,5 @@ struct S<'a, T:'a> {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
S { o: &None }; //~ ERROR type annotations required
|
||||
S { o: &None }; //~ ERROR type annotations or generic parameter binding required
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
@ -10,5 +10,6 @@
|
||||
|
||||
|
||||
fn main() {
|
||||
let _foo = Vec::new(); //~ ERROR type annotations required
|
||||
let _foo = Vec::new();
|
||||
//~^ ERROR type annotations or generic parameter binding required
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user