Fix slice printing

This commit is contained in:
oncemoreification 2013-02-23 21:46:36 -08:00
parent 4ffff6697b
commit c4ef822dc7
2 changed files with 2 additions and 4 deletions

View File

@ -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, "/")
}
}
@ -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)
}

View File

@ -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
}