auto merge of #4884 : pcwalton/rust/pretty-print-new-impl-syntax, r=pcwalton

r? @brson
This commit is contained in:
bors 2013-02-13 15:49:01 -08:00
commit c51ecc3223
3 changed files with 6 additions and 4 deletions

View file

@ -554,15 +554,17 @@ pub fn print_item(s: @ps, &&item: @ast::item) {
print_type_params(s, tps);
space(s.s);
}
print_type(s, ty);
match opt_trait {
Some(t) => {
word_space(s, ~":");
print_path(s, t.path, false);
space(s.s);
word_space(s, ~"for");
}
None => ()
};
print_type(s, ty);
space(s.s);
if methods.len() == 0 {

View file

@ -14,7 +14,7 @@ struct cat {
name: ~str,
}
impl cat: Drop {
impl Drop for cat {
#[cat_dropper]
fn finalize(&self) { error!("%s landed on hir feet" , self . name); }
}

View file

@ -19,7 +19,7 @@ trait frobable {
}
#[int_frobable]
impl int: frobable {
impl frobable for int {
#[frob_attr1]
fn frob() {
#[frob_attr2];