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
|
@ -235,8 +235,8 @@ fn noop_fold_item_underscore(i: item_, fld: ast_fold) -> item_ {
|
|||
methods: vec::map(fld.fold_method, o.methods)},
|
||||
typms, d)
|
||||
}
|
||||
item_impl(iface, ty, methods) {
|
||||
item_impl(fld.fold_path(iface), fld.fold_ty(ty),
|
||||
item_impl(tps, ty, methods) {
|
||||
item_impl(tps, fld.fold_ty(ty),
|
||||
vec::map(fld.fold_method, methods))
|
||||
}
|
||||
item_res(dtor, did, typms, cid) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue