1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
use core::*; pub struct Crate { file: ~str, flags: ~[~str], cfg: ~[~str] } pub impl Crate { fn flag(flag: ~str) -> Crate { Crate { flags: vec::append(copy self.flags, ~[flag]), .. copy self } } } pub fn build(_targets: ~[Crate]) { // TODO: magic } pub mod util { }