about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-05-29 12:11:40 -0700
committerbors <bors@rust-lang.org>2014-05-29 12:11:40 -0700
commit729ee203387cc3a3f7387cffd018aba93b0110e6 (patch)
tree758f048b13674ba9fa0caf2eb4ca4dba7442436e /src/libsyntax
parent50b8528970734adcc654740c51c50094f73dcbee (diff)
parent4e3db5e0f48f5dcebd34a5a5be1a10c6d9a8f706 (diff)
downloadrust-729ee203387cc3a3f7387cffd018aba93b0110e6.tar.gz
rust-729ee203387cc3a3f7387cffd018aba93b0110e6.zip
auto merge of #14483 : ahmedcharles/rust/patbox, r=alexcrichton
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ast.rs2
-rw-r--r--src/libsyntax/ast_util.rs2
-rw-r--r--src/libsyntax/fold.rs2
-rw-r--r--src/libsyntax/parse/parser.rs6
-rw-r--r--src/libsyntax/print/pprust.rs2
-rw-r--r--src/libsyntax/visit.rs2
6 files changed, 8 insertions, 8 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index edeff1229bd..d6af10ddc18 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -347,7 +347,7 @@ pub enum Pat_ {
                                      * we don't bind the fields to names */
     PatStruct(Path, Vec<FieldPat> , bool),
     PatTup(Vec<@Pat> ),
-    PatUniq(@Pat),
+    PatBox(@Pat),
     PatRegion(@Pat), // reference pattern
     PatLit(@Expr),
     PatRange(@Expr, @Expr),
diff --git a/src/libsyntax/ast_util.rs b/src/libsyntax/ast_util.rs
index 5b61cd45483..e4f2f7f26cf 100644
--- a/src/libsyntax/ast_util.rs
+++ b/src/libsyntax/ast_util.rs
@@ -657,7 +657,7 @@ pub fn walk_pat(pat: &Pat, it: |&Pat| -> bool) -> bool {
         PatEnum(_, Some(ref s)) | PatTup(ref s) => {
             s.iter().advance(|&p| walk_pat(p, |p| it(p)))
         }
-        PatUniq(s) | PatRegion(s) => {
+        PatBox(s) | PatRegion(s) => {
             walk_pat(s, it)
         }
         PatVec(ref before, ref slice, ref after) => {
diff --git a/src/libsyntax/fold.rs b/src/libsyntax/fold.rs
index b66d1f7eae5..8903eb80829 100644
--- a/src/libsyntax/fold.rs
+++ b/src/libsyntax/fold.rs
@@ -760,7 +760,7 @@ pub fn noop_fold_pat<T: Folder>(p: @Pat, folder: &mut T) -> @Pat {
             PatStruct(pth_, fs, etc)
         }
         PatTup(ref elts) => PatTup(elts.iter().map(|x| folder.fold_pat(*x)).collect()),
-        PatUniq(inner) => PatUniq(folder.fold_pat(inner)),
+        PatBox(inner) => PatBox(folder.fold_pat(inner)),
         PatRegion(inner) => PatRegion(folder.fold_pat(inner)),
         PatRange(e1, e2) => {
             PatRange(folder.fold_expr(e1), folder.fold_expr(e2))
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 65ad83d4b4f..1902df30b99 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -39,7 +39,7 @@ use ast::{MutImmutable, MutMutable, Mac_, MacInvocTT, Matcher, MatchNonterminal}
 use ast::{MatchSeq, MatchTok, Method, MutTy, BiMul, Mutability};
 use ast::{NamedField, UnNeg, NoReturn, UnNot, P, Pat, PatEnum};
 use ast::{PatIdent, PatLit, PatRange, PatRegion, PatStruct};
-use ast::{PatTup, PatUniq, PatWild, PatWildMulti};
+use ast::{PatTup, PatBox, PatWild, PatWildMulti};
 use ast::{BiRem, Required};
 use ast::{RetStyle, Return, BiShl, BiShr, Stmt, StmtDecl};
 use ast::{Sized, DynSize, StaticSize};
@@ -2784,7 +2784,7 @@ impl<'a> Parser<'a> {
             // parse ~pat
             self.bump();
             let sub = self.parse_pat();
-            pat = PatUniq(sub);
+            pat = PatBox(sub);
             hi = self.last_span.hi;
             self.obsolete(self.last_span, ObsoleteOwnedPattern);
             return @ast::Pat {
@@ -2888,7 +2888,7 @@ impl<'a> Parser<'a> {
             // FIXME(#13910): Rename to `PatBox` and extend to full DST
             // support.
             let sub = self.parse_pat();
-            pat = PatUniq(sub);
+            pat = PatBox(sub);
             hi = self.last_span.hi;
             return @ast::Pat {
                 id: ast::DUMMY_NODE_ID,
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index 3127085ffed..90436faca23 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -1721,7 +1721,7 @@ impl<'a> State<'a> {
                 }
                 try!(self.pclose());
             }
-            ast::PatUniq(inner) => {
+            ast::PatBox(inner) => {
                 try!(word(&mut self.s, "box "));
                 try!(self.print_pat(inner));
             }
diff --git a/src/libsyntax/visit.rs b/src/libsyntax/visit.rs
index eb7aeb0e327..efa8c8e6664 100644
--- a/src/libsyntax/visit.rs
+++ b/src/libsyntax/visit.rs
@@ -429,7 +429,7 @@ pub fn walk_pat<E: Clone, V: Visitor<E>>(visitor: &mut V, pattern: &Pat, env: E)
                 visitor.visit_pat(*tuple_element, env.clone())
             }
         }
-        PatUniq(subpattern) |
+        PatBox(subpattern) |
         PatRegion(subpattern) => {
             visitor.visit_pat(subpattern, env)
         }