about summary refs log tree commit diff
path: root/src/libsyntax/print/pprust.rs
diff options
context:
space:
mode:
authorEdward Wang <edward.yu.wang@gmail.com>2014-02-15 16:54:32 +0800
committerEdward Wang <edward.yu.wang@gmail.com>2014-02-23 21:20:37 +0800
commit386db05df8aa8349857ad6f5486db0bdcc79f3cd (patch)
treeb85d659e88e28126c3874a194126079c280b7739 /src/libsyntax/print/pprust.rs
parent551da0615764853153db944063ae2e271414a71b (diff)
downloadrust-386db05df8aa8349857ad6f5486db0bdcc79f3cd.tar.gz
rust-386db05df8aa8349857ad6f5486db0bdcc79f3cd.zip
Make break and continue hygienic
Makes labelled loops hygiene by performing renaming of the labels
defined in e.g. `'x: loop { ... }` and then used in break and continue
statements within loop body so that they act hygienically when used with
macros.

Closes #12262.
Diffstat (limited to 'src/libsyntax/print/pprust.rs')
-rw-r--r--src/libsyntax/print/pprust.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index f934a9022a6..8fb813407d0 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -1471,7 +1471,7 @@ pub fn print_expr(s: &mut State, expr: &ast::Expr) -> io::IoResult<()> {
         try!(space(&mut s.s));
         for ident in opt_ident.iter() {
             try!(word(&mut s.s, "'"));
-            try!(print_name(s, *ident));
+            try!(print_ident(s, *ident));
             try!(space(&mut s.s));
         }
       }
@@ -1480,7 +1480,7 @@ pub fn print_expr(s: &mut State, expr: &ast::Expr) -> io::IoResult<()> {
         try!(space(&mut s.s));
         for ident in opt_ident.iter() {
             try!(word(&mut s.s, "'"));
-            try!(print_name(s, *ident));
+            try!(print_ident(s, *ident));
             try!(space(&mut s.s))
         }
       }