Skip to content

Commit 28b1b2e

Browse files
author
Jakub Bukaj
committed
Update tests accordingly
1 parent eb01b17 commit 28b1b2e

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// wrong arity.
1515

1616
fn _foo<F: Fn()> (f: F) {
17-
|t| f(t); //~ ERROR E0058
17+
|t| f(t); //~ ERROR E0057
1818
}
1919

2020
fn main() {}

src/test/compile-fail/non-constant-enum-for-vec-repeat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ enum State { ST_NULL, ST_WHITESPACE }
1212

1313
fn main() {
1414
[ST_NULL, ..(ST_WHITESPACE as uint)];
15-
//~^ ERROR expected constant integer for repeat count, found variable
15+
//~^ ERROR expected constant integer for repeat count, found non-constant expression
1616
}

src/test/compile-fail/repeat_count.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
fn main() {
1414
let n = 1;
1515
let a = [0, ..n]; //~ ERROR expected constant integer for repeat count, found variable
16-
let b = [0, ..()]; //~ ERROR expected positive integer for repeat count, found ()
17-
//~^ ERROR: expected `uint`, found `()`
16+
let b = [0, ..()];
17+
//~^ ERROR expected constant integer for repeat count, found non-constant expression
18+
//~^^ ERROR: expected `uint`, found `()`
1819
let c = [0, ..true]; //~ ERROR expected positive integer for repeat count, found boolean
1920
//~^ ERROR: expected `uint`, found `bool`
2021
let d = [0, ..0.5]; //~ ERROR expected positive integer for repeat count, found float

src/test/run-pass/concat.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ pub fn main() {
1515
assert_eq!(concat!("qux", "quux",).to_string(), "quxquux".to_string());
1616

1717
assert_eq!(
18-
concat!(1, 2i, 3u, 4f32, 4.0, 'a', true, ()),
18+
concat!(1, 2i, 3u, 4f32, 4.0, 'a', true),
1919
"12344.0atrue"
2020
);
2121

2222
assert!(match "12344.0atrue" {
23-
concat!(1, 2i, 3u, 4f32, 4.0, 'a', true, ()) => true,
23+
concat!(1, 2i, 3u, 4f32, 4.0, 'a', true) => true,
2424
_ => false
2525
})
2626
}

0 commit comments

Comments
 (0)