提交 28b1b2ec 编写于 作者: J Jakub Bukaj

Update tests accordingly

上级 eb01b17b
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
// wrong arity. // wrong arity.
fn _foo<F: Fn()> (f: F) { fn _foo<F: Fn()> (f: F) {
|t| f(t); //~ ERROR E0058 |t| f(t); //~ ERROR E0057
} }
fn main() {} fn main() {}
...@@ -12,5 +12,5 @@ enum State { ST_NULL, ST_WHITESPACE } ...@@ -12,5 +12,5 @@ enum State { ST_NULL, ST_WHITESPACE }
fn main() { fn main() {
[ST_NULL, ..(ST_WHITESPACE as uint)]; [ST_NULL, ..(ST_WHITESPACE as uint)];
//~^ ERROR expected constant integer for repeat count, found variable //~^ ERROR expected constant integer for repeat count, found non-constant expression
} }
...@@ -13,8 +13,9 @@ ...@@ -13,8 +13,9 @@
fn main() { fn main() {
let n = 1; let n = 1;
let a = [0, ..n]; //~ ERROR expected constant integer for repeat count, found variable let a = [0, ..n]; //~ ERROR expected constant integer for repeat count, found variable
let b = [0, ..()]; //~ ERROR expected positive integer for repeat count, found () let b = [0, ..()];
//~^ ERROR: expected `uint`, found `()` //~^ ERROR expected constant integer for repeat count, found non-constant expression
//~^^ ERROR: expected `uint`, found `()`
let c = [0, ..true]; //~ ERROR expected positive integer for repeat count, found boolean let c = [0, ..true]; //~ ERROR expected positive integer for repeat count, found boolean
//~^ ERROR: expected `uint`, found `bool` //~^ ERROR: expected `uint`, found `bool`
let d = [0, ..0.5]; //~ ERROR expected positive integer for repeat count, found float let d = [0, ..0.5]; //~ ERROR expected positive integer for repeat count, found float
......
...@@ -15,12 +15,12 @@ pub fn main() { ...@@ -15,12 +15,12 @@ pub fn main() {
assert_eq!(concat!("qux", "quux",).to_string(), "quxquux".to_string()); assert_eq!(concat!("qux", "quux",).to_string(), "quxquux".to_string());
assert_eq!( assert_eq!(
concat!(1, 2i, 3u, 4f32, 4.0, 'a', true, ()), concat!(1, 2i, 3u, 4f32, 4.0, 'a', true),
"12344.0atrue" "12344.0atrue"
); );
assert!(match "12344.0atrue" { assert!(match "12344.0atrue" {
concat!(1, 2i, 3u, 4f32, 4.0, 'a', true, ()) => true, concat!(1, 2i, 3u, 4f32, 4.0, 'a', true) => true,
_ => false _ => false
}) })
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册