Allow explicit self-calls within classes
Allow writing self.f() within a class that has a method f. In a future commit, this syntax will be required. For now, you can write either self.f() or f(). I added a "privacy" field to all methods (whether class methods or not), which allowed me to refactor the AST somewhat (getting rid of the class_item type; now there's just class_member).
This commit is contained in:
parent
fe610f04d8
commit
f7bbe537c1
18 changed files with 201 additions and 198 deletions
|
|
@ -431,7 +431,7 @@ fn get_iface_methods(cdata: cmd, id: ast::node_id, tcx: ty::ctxt)
|
|||
'u' { ast::unsafe_fn }
|
||||
'f' { ast::impure_fn }
|
||||
'p' { ast::pure_fn }
|
||||
}}];
|
||||
}, privacy: ast::pub}];
|
||||
}
|
||||
@result
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue