about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-07-08 18:49:46 -0700
committerbors <bors@rust-lang.org>2013-07-08 18:49:46 -0700
commita48ca3290df992fde2f74ccf5b9f4e36563af8da (patch)
tree816142177cf53d6185626aee592ef837b5e1d93a /src/libsyntax/parse/parser.rs
parent30c8aac677a754e0d4ebc16f261618f15d15a6e2 (diff)
parent0c6d02f391aa668b2ead91e8a4ed545475ac2c90 (diff)
downloadrust-a48ca3290df992fde2f74ccf5b9f4e36563af8da.tar.gz
rust-a48ca3290df992fde2f74ccf5b9f4e36563af8da.zip
auto merge of #7262 : nikomatsakis/rust/ref-bindings-in-irrefut-patterns, r=catamorphism
Correct treatment of irrefutable patterns. The old code was wrong in many, many ways. `ref` bindings didn't work, it sometimes copied when it should have moved, the borrow checker didn't even look at such patterns at all, we weren't consistent about preventing values with destructors from being pulled apart, etc.

Fixes #3224.
Fixes #3225.
Fixes #3255.
Fixes #6225.
Fixes #6386.

r? @catamorphism

Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index c43b350abdb..8666c84bbef 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -3914,7 +3914,7 @@ impl Parser {
         };
         let full_path = full_path.normalize();
 
-        let maybe_i = do self.sess.included_mod_stack.iter().position |&p| { p == full_path };
+        let maybe_i = do self.sess.included_mod_stack.iter().position |p| { *p == full_path };
         match maybe_i {
             Some(i) => {
                 let stack = &self.sess.included_mod_stack;