Skip to content

Commit

Permalink
librustc: use new [ty, .. len] syntax for fixed vector errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
huonw committed Apr 6, 2013
1 parent 08e2cf8 commit 28f0782
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/librustc/util/ppaux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ pub fn trait_store_to_str(cx: ctxt, s: ty::TraitStore) -> ~str {
pub fn vstore_ty_to_str(cx: ctxt, ty: ~str, vs: ty::vstore) -> ~str {
match vs {
ty::vstore_fixed(_) => {
fmt!("[%s * %s]", ty, vstore_to_str(cx, vs))
fmt!("[%s, .. %s]", ty, vstore_to_str(cx, vs))
}
ty::vstore_slice(_) => {
fmt!("%s %s", vstore_to_str(cx, vs), ty)
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-2149.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ impl<A> vec_monad<A> for ~[A] {
}
fn main() {
["hi"].bind(|x| [x] );
//~^ ERROR type `[&'static str * 1]` does not implement any method in scope named `bind`
//~^ ERROR type `[&'static str, .. 1]` does not implement any method in scope named `bind`
//~^^ ERROR Unconstrained region variable
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-4517.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ fn bar(int_param: int) {}

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

5 comments on commit 28f0782

@bors
Copy link
Contributor

@bors bors commented on 28f0782 Apr 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 28f0782 Apr 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging dbaupp/rust/rustc-fixed-vector-pprint = 28f0782 into auto

@bors
Copy link
Contributor

@bors bors commented on 28f0782 Apr 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dbaupp/rust/rustc-fixed-vector-pprint = 28f0782 merged ok, testing candidate = 44d4d6d

@bors
Copy link
Contributor

@bors bors commented on 28f0782 Apr 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 28f0782 Apr 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding incoming to auto = 44d4d6d

Please sign in to comment.