Skip to content

Commit

Permalink
Fix slice printing
Browse files Browse the repository at this point in the history
  • Loading branch information
jjjjw committed Feb 24, 2013
1 parent 4ffff66 commit c4ef822
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/librustc/util/ppaux.rs
Expand Up @@ -238,8 +238,7 @@ pub fn vstore_to_str(cx: ctxt, vs: ty::vstore) -> ~str {
ty::vstore_fixed(n) => fmt!("%u", n),
ty::vstore_uniq => ~"~",
ty::vstore_box => ~"@",
/* FIXME(#4517) slice fmt */
ty::vstore_slice(r) => region_to_str(cx, r)
ty::vstore_slice(r) => region_to_str_adorned(cx, "&", r, "/")
}
}

Expand All @@ -248,7 +247,6 @@ pub fn vstore_ty_to_str(cx: ctxt, ty: ~str, vs: ty::vstore) -> ~str {
ty::vstore_fixed(_) => {
fmt!("[%s * %s]", ty, vstore_to_str(cx, vs))
}
/* FIXME(#4517) slice fmt */
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
Expand Up @@ -22,6 +22,6 @@ impl<A> vec_monad<A> for ~[A] {
}
fn main() {
["hi"].bind(|x| [x] );
//~^ ERROR type `[&staticstr * 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
}

5 comments on commit c4ef822

@bors
Copy link
Contributor

@bors bors commented on c4ef822 Feb 26, 2013

Choose a reason for hiding this comment

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

saw approval from brson
at jjjjw@c4ef822

@bors
Copy link
Contributor

@bors bors commented on c4ef822 Feb 26, 2013

Choose a reason for hiding this comment

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

merging oncemoreification/rust/issue-4517 = c4ef822 into auto

@bors
Copy link
Contributor

@bors bors commented on c4ef822 Feb 26, 2013

Choose a reason for hiding this comment

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

oncemoreification/rust/issue-4517 = c4ef822 merged ok, testing candidate = 580df4d

@bors
Copy link
Contributor

@bors bors commented on c4ef822 Feb 26, 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 c4ef822 Feb 26, 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 = 580df4d

Please sign in to comment.