Change syntax for impl
Move the name of the bundle to the front, allow type parameters (not
handled yet), and add a 'for' keyword:
impl utils for int {
fn str() -> str { int::str(self) }
fn times(f: block()) { ... }
}
This commit is contained in:
parent
4f826d81f6
commit
cff6bdd036
6 changed files with 34 additions and 20 deletions
|
|
@ -505,7 +505,7 @@ tag item_ {
|
|||
node_id /* dtor id */,
|
||||
[ty_param],
|
||||
node_id /* ctor id */);
|
||||
item_impl(@path /* iface */, @ty /* self */, [@method]);
|
||||
item_impl([ty_param], @ty /* self */, [@method]);
|
||||
}
|
||||
|
||||
type native_item =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue