diff options
| author | oncemoreification <jjweber@gmail.com> | 2013-02-23 21:46:36 -0800 |
|---|---|---|
| committer | oncemoreification <jjweber@gmail.com> | 2013-02-23 21:46:36 -0800 |
| commit | c4ef822dc7e4fcd05f9e4663e6f5c2196129d605 (patch) | |
| tree | 8089b2b7abbb734cc2c705b215d726d235ef377b | |
| parent | 4ffff6697b144b346cc3853a82f1056b593ef58d (diff) | |
| download | rust-c4ef822dc7e4fcd05f9e4663e6f5c2196129d605.tar.gz rust-c4ef822dc7e4fcd05f9e4663e6f5c2196129d605.zip | |
Fix slice printing
| -rw-r--r-- | src/librustc/util/ppaux.rs | 4 | ||||
| -rw-r--r-- | src/test/compile-fail/issue-2149.rs | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/librustc/util/ppaux.rs b/src/librustc/util/ppaux.rs index 924574a4c0c..a337431cefd 100644 --- a/src/librustc/util/ppaux.rs +++ b/src/librustc/util/ppaux.rs @@ -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) } diff --git a/src/test/compile-fail/issue-2149.rs b/src/test/compile-fail/issue-2149.rs index b3820939f8a..0880cabb2ab 100644 --- a/src/test/compile-fail/issue-2149.rs +++ b/src/test/compile-fail/issue-2149.rs @@ -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 } |
