about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-03-12 19:21:44 -0700
committerbors <bors@rust-lang.org>2014-03-12 19:21:44 -0700
commita53242a1a38301b4a40be71fcd182568b7ee91b6 (patch)
tree86001b14271c4107e54f73af6a7fe50db580c7b5 /src/libsyntax/parse
parent2eebeb81372e320510a1c1e2eef96eb5146a1e1f (diff)
parentf079c94f723f8c67319da8c727324b2011d7b36f (diff)
downloadrust-a53242a1a38301b4a40be71fcd182568b7ee91b6.tar.gz
rust-a53242a1a38301b4a40be71fcd182568b7ee91b6.zip
auto merge of #12756 : pongad/rust/remove_owned_str_pat, r=alexcrichton
match-drop-strs-issue-4541.rs deleted as it's the same with issue-4541.rs
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs19
1 files changed, 1 insertions, 18 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 7760ca89eb2..676db94cd7c 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -2838,24 +2838,7 @@ impl Parser {
             // parse ~pat
             self.bump();
             let sub = self.parse_pat();
-            hi = sub.span.hi;
-            // HACK: parse ~"..." as a literal of a vstore ~str
-            pat = match sub.node {
-                PatLit(e) => {
-                    match e.node {
-                        ExprLit(lit) if lit_is_str(lit) => {
-                            let vst = @Expr {
-                                id: ast::DUMMY_NODE_ID,
-                                node: ExprVstore(e, ExprVstoreUniq),
-                                span: mk_sp(lo, hi),
-                            };
-                            PatLit(vst)
-                        }
-                        _ => PatUniq(sub)
-                    }
-                }
-                _ => PatUniq(sub)
-            };
+            pat = PatUniq(sub);
             hi = self.last_span.hi;
             return @ast::Pat {
                 id: ast::DUMMY_NODE_ID,