]> git.lizzy.rs Git - rust.git/commit
Change syntax for impl
authorMarijn Haverbeke <marijnh@gmail.com>
Fri, 16 Dec 2011 09:42:28 +0000 (10:42 +0100)
committerMarijn Haverbeke <marijnh@gmail.com>
Fri, 16 Dec 2011 10:46:57 +0000 (11:46 +0100)
commitcff6bdd03616b6f20028ec8568d03363ccc3f9f2
treee24a03d847e02bea41bded20923757d64df93da0
parent4f826d81f611aa9486b25e1e123b24131659bd51
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()) { ... }
    }
src/comp/syntax/ast.rs
src/comp/syntax/fold.rs
src/comp/syntax/parse/parser.rs
src/comp/syntax/print/pprust.rs
src/comp/syntax/visit.rs
src/test/run-pass/static-impl.rs [new file with mode: 0644]