diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-07-12 18:09:12 -0700 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-07-12 18:09:31 -0700 |
| commit | d5b8bbb4b20a5d88eea0b317102ed747deed802d (patch) | |
| tree | ae3e42325091141d3d02f21991c5d325fb7e71d4 | |
| parent | ea5f19206c77fd6413ddfe86290b35520c779df7 (diff) | |
| download | rust-d5b8bbb4b20a5d88eea0b317102ed747deed802d.tar.gz rust-d5b8bbb4b20a5d88eea0b317102ed747deed802d.zip | |
Pretty-print regions in slices correctly
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 7a41bb936a3..d43ed8043ee 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -860,8 +860,17 @@ fn print_vstore(s: ps, t: ast::vstore) { ast::vstore_fixed(none) { word(s.s, "_"); } ast::vstore_uniq { word(s.s, "~"); } ast::vstore_box { word(s.s, "@"); } - ast::vstore_slice(r) { print_region(s, r); word(s.s, "."); } - } + ast::vstore_slice(r) { + alt r.node { + ast::re_anon { word(s.s, "&"); } + ast::re_named(name) { + word(s.s, "&"); + word(s.s, *name); + word(s.s, "."); + } + } + } + } } fn print_expr(s: ps, &&expr: @ast::expr) { |
