about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-10-29 15:11:30 -0700
committerbors <bors@rust-lang.org>2013-10-29 15:11:30 -0700
commit611c94d984c1c062d6e123d986c0511443900850 (patch)
tree95b7cf3f899e8cd74c6cb2816942750d77a07d4a /src/libsyntax/parse
parent886819cca1208210cb73892f8fe4b7b9140068dc (diff)
parentb5e073830bb09acd3cd4146a35d5d077b88453b0 (diff)
downloadrust-611c94d984c1c062d6e123d986c0511443900850.tar.gz
rust-611c94d984c1c062d6e123d986c0511443900850.zip
auto merge of #10134 : reedlepee123/rust/priv_fields, r=brson
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 716fb5040f6..68796a39f1b 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -309,7 +309,8 @@ pub fn Parser(sess: @mut ParseSess,
         quote_depth: @mut 0,
         obsolete_set: @mut HashSet::new(),
         mod_path_stack: @mut ~[],
-        open_braces: @mut ~[]
+        open_braces: @mut ~[],
+        non_copyable: util::NonCopyable
     }
 }
 
@@ -339,13 +340,9 @@ pub struct Parser {
     /// Used to determine the path to externally loaded source files
     mod_path_stack: @mut ~[@str],
     /// Stack of spans of open delimiters. Used for error message.
-    open_braces: @mut ~[Span]
-}
-
-#[unsafe_destructor]
-impl Drop for Parser {
+    open_braces: @mut ~[Span],
     /* do not copy the parser; its state is tied to outside state */
-    fn drop(&mut self) {}
+    priv non_copyable: util::NonCopyable
 }
 
 fn is_plain_ident_or_underscore(t: &token::Token) -> bool {