]> git.lizzy.rs Git - rust.git/commitdiff
Don't use static default method
authorJohn Barker <jebarker@gmail.com>
Tue, 9 Jul 2013 14:21:25 +0000 (10:21 -0400)
committerJohn Barker <jebarker@gmail.com>
Tue, 9 Jul 2013 14:21:25 +0000 (10:21 -0400)
 - also removed redundant assignment to is_mutbl
 - updated copyright

src/libsyntax/parse/parser.rs
src/test/run-pass/traits-default-method-mut.rs

index e8e7828e4656dbabfc48004b5abfce731e7edb5c..114a8bf9d3d22f161e53aacece9005c29b9818c7 100644 (file)
@@ -1086,7 +1086,6 @@ pub fn parse_arg_general(&self, require_name: bool) -> arg {
             self.expect(&token::COLON);
             pat
         } else {
-            is_mutbl = false;
             ast_util::ident_to_pat(self.get_id(),
                                    *self.last_span,
                                    special_idents::invalid)
index a36f0178c157cd233ae2e4f529202338327ff4c8..3286c4ef5935100ccea61c2fee87ddba8dee2530 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -11,7 +11,7 @@
 #[allow(default_methods)];
 
 trait Foo {
-    fn foo(mut v: int) { v = 1; }
+    fn foo(&self, mut v: int) { v = 1; }
 }
 
 fn main() {}