Skip to content

Commit 6d03c6d

Browse files
committed
---
yaml --- r: 14733 b: refs/heads/try c: 2975bcd h: refs/heads/master i: 14731: a2789f0 v: v3
1 parent 6ad8c0b commit 6d03c6d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: 92ed73d0bd0a5d0871658c379a3f547d08f42b95
5+
refs/heads/try: 2975bcdd7d9ee0772f1d0a106898eca26fa0a5c4
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/rustc/util/ppaux.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ fn ty_to_str(cx: ctxt, typ: t) -> str {
6868
base
6969
}
7070
}
71+
fn region_to_str(_cx: ctxt, r: region) -> str {
72+
alt r {
73+
re_named(_) { "<name>." } // TODO: include name
74+
re_caller(_) { "<caller>." }
75+
re_block(_) { "<block>." } // TODO: include line number
76+
}
77+
}
7178

7279
// if there is an id, print that instead of the structural type:
7380
alt ty::type_def_id(typ) {
@@ -101,6 +108,7 @@ fn ty_to_str(cx: ctxt, typ: t) -> str {
101108
ty_box(tm) { "@" + mt_to_str(cx, tm) }
102109
ty_uniq(tm) { "~" + mt_to_str(cx, tm) }
103110
ty_ptr(tm) { "*" + mt_to_str(cx, tm) }
111+
ty_rptr(r, tm) { "&" + region_to_str(cx, r) + mt_to_str(cx, tm) }
104112
ty_vec(tm) { "[" + mt_to_str(cx, tm) + "]" }
105113
ty_type { "type" }
106114
ty_rec(elems) {

0 commit comments

Comments
 (0)