diff options
| author | bors <bors@rust-lang.org> | 2013-08-27 17:05:46 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-08-27 17:05:46 -0700 |
| commit | 58d6eb50483c44ecc72db6d77b71ad5d5a7aca4d (patch) | |
| tree | a1930a85c3a7d212a45697678ceaee815dcdcff7 /src/libsyntax | |
| parent | d5c144a4cd1713e14b0fccd6146648bf968522d9 (diff) | |
| parent | 8c09865b66f5e2865037e6ce1396ba0a653136e0 (diff) | |
| download | rust-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.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ast_util.rs | 2 |
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) |
