mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-18 18:04:13 +00:00
Fix slice printing
This commit is contained in:
parent
4ffff6697b
commit
c4ef822dc7
@ -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)
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user