Skip to content

Commit c4ef822

Browse files
committed
Fix slice printing
1 parent 4ffff66 commit c4ef822

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/librustc/util/ppaux.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,7 @@ pub fn vstore_to_str(cx: ctxt, vs: ty::vstore) -> ~str {
238238
ty::vstore_fixed(n) => fmt!("%u", n),
239239
ty::vstore_uniq => ~"~",
240240
ty::vstore_box => ~"@",
241-
/* FIXME(#4517) slice fmt */
242-
ty::vstore_slice(r) => region_to_str(cx, r)
241+
ty::vstore_slice(r) => region_to_str_adorned(cx, "&", r, "/")
243242
}
244243
}
245244

@@ -248,7 +247,6 @@ pub fn vstore_ty_to_str(cx: ctxt, ty: ~str, vs: ty::vstore) -> ~str {
248247
ty::vstore_fixed(_) => {
249248
fmt!("[%s * %s]", ty, vstore_to_str(cx, vs))
250249
}
251-
/* FIXME(#4517) slice fmt */
252250
ty::vstore_slice(_) => {
253251
fmt!("%s/%s", vstore_to_str(cx, vs), ty)
254252
}

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 `[&staticstr * 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
}

0 commit comments

Comments
 (0)