提交 4b8098bb 编写于 作者: R Ruud van Asseldonk

test: Update expected compile-fail message for E0282

上级 414dfb13
// 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
}
// 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
}
// 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
// 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
}
// 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 @@
fn main() {
mem::transmute(0);
//~^ ERROR type annotations required
//~^ ERROR type annotations or generic parameter binding required
}
// 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() {
......
// 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 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() {
......
// 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
}
// 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 @@ fn foo(&self) -> isize {2}
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();
}
......
// 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 @@ fn test<T,U>(_: T, _: 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() {}
// 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
}
// 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
}
// 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
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册