about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-08-27 17:05:46 -0700
committerbors <bors@rust-lang.org>2013-08-27 17:05:46 -0700
commit58d6eb50483c44ecc72db6d77b71ad5d5a7aca4d (patch)
treea1930a85c3a7d212a45697678ceaee815dcdcff7 /src/libsyntax
parentd5c144a4cd1713e14b0fccd6146648bf968522d9 (diff)
parent8c09865b66f5e2865037e6ce1396ba0a653136e0 (diff)
downloadrust-58d6eb50483c44ecc72db6d77b71ad5d5a7aca4d.tar.gz
rust-58d6eb50483c44ecc72db6d77b71ad5d5a7aca4d.zip
auto merge of #8797 : nikomatsakis/rust/issue-8625-assign-to-andmut-in-borrowed-loc-2, r=pcwalton
Fixes for #8625 to prevent assigning to `&mut` in borrowed or aliasable locations. The old code was insufficient in that it failed to catch bizarre cases like `& &mut &mut`. 

r? @pnkfelix
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ast.rs2
-rw-r--r--src/libsyntax/ast_util.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index b01c19a59c1..f09c7427ecc 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -171,7 +171,7 @@ pub enum def {
     def_static_method(/* method */ def_id,
                       /* trait */  Option<def_id>,
                       purity),
-    def_self(NodeId, bool /* is_implicit */),
+    def_self(NodeId),
     def_self_ty(/* trait id */ NodeId),
     def_mod(def_id),
     def_foreign_mod(def_id),
diff --git a/src/libsyntax/ast_util.rs b/src/libsyntax/ast_util.rs
index cfbe61ca65e..a39da4301ba 100644
--- a/src/libsyntax/ast_util.rs
+++ b/src/libsyntax/ast_util.rs
@@ -64,7 +64,7 @@ pub fn def_id_of_def(d: def) -> def_id {
       def_use(id) | def_struct(id) | def_trait(id) | def_method(id, _) => {
         id
       }
-      def_arg(id, _) | def_local(id, _) | def_self(id, _) | def_self_ty(id)
+      def_arg(id, _) | def_local(id, _) | def_self(id) | def_self_ty(id)
       | def_upvar(id, _, _, _) | def_binding(id, _) | def_region(id)
       | def_typaram_binder(id) | def_label(id) => {
         local_def(id)