diff --git a/src/rustc/util/ppaux.rs b/src/rustc/util/ppaux.rs index 9ebcce1b9a8..711b27327c2 100644 --- a/src/rustc/util/ppaux.rs +++ b/src/rustc/util/ppaux.rs @@ -68,6 +68,13 @@ fn ty_to_str(cx: ctxt, typ: t) -> str { base } } + fn region_to_str(_cx: ctxt, r: region) -> str { + alt r { + re_named(_) { "." } // TODO: include name + re_caller(_) { "." } + re_block(_) { "." } // TODO: include line number + } + } // if there is an id, print that instead of the structural type: alt ty::type_def_id(typ) { @@ -101,6 +108,7 @@ fn ty_to_str(cx: ctxt, typ: t) -> str { ty_box(tm) { "@" + mt_to_str(cx, tm) } ty_uniq(tm) { "~" + mt_to_str(cx, tm) } ty_ptr(tm) { "*" + mt_to_str(cx, tm) } + ty_rptr(r, tm) { "&" + region_to_str(cx, r) + mt_to_str(cx, tm) } ty_vec(tm) { "[" + mt_to_str(cx, tm) + "]" } ty_type { "type" } ty_rec(elems) {