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

Update tests accordingly

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