Skip to content

Commit 28f0782

Browse files
committed
librustc: use new [ty, .. len] syntax for fixed vector errors.
1 parent 08e2cf8 commit 28f0782

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/librustc/util/ppaux.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ pub fn trait_store_to_str(cx: ctxt, s: ty::TraitStore) -> ~str {
248248
pub fn vstore_ty_to_str(cx: ctxt, ty: ~str, vs: ty::vstore) -> ~str {
249249
match vs {
250250
ty::vstore_fixed(_) => {
251-
fmt!("[%s * %s]", ty, vstore_to_str(cx, vs))
251+
fmt!("[%s, .. %s]", ty, vstore_to_str(cx, vs))
252252
}
253253
ty::vstore_slice(_) => {
254254
fmt!("%s %s", vstore_to_str(cx, vs), ty)

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ impl<A> vec_monad<A> for ~[A] {
2222
}
2323
fn main() {
2424
["hi"].bind(|x| [x] );
25-
//~^ ERROR type `[&'static str * 1]` does not implement any method in scope named `bind`
25+
//~^ ERROR type `[&'static str, .. 1]` does not implement any method in scope named `bind`
2626
//~^^ ERROR Unconstrained region variable
2727
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ fn bar(int_param: int) {}
22

33
fn main() {
44
let foo: [u8, ..4] = [1u8, ..4u8];
5-
bar(foo); //~ ERROR mismatched types: expected `int` but found `[u8 * 4]` (expected int but found vector)
5+
bar(foo); //~ ERROR mismatched types: expected `int` but found `[u8, .. 4]` (expected int but found vector)
66
}

0 commit comments

Comments
 (0)