nit: I doubt it makes a difference, but this will be slightly faster and clearer (avoids the bounds check) if you just do:

    let mut curr_declarations = ~[];
    for rule in rules.iter() { ... }
    declarations_list.push(curr_declarations);