auto merge of #4884 : pcwalton/rust/pretty-print-new-impl-syntax, r=pcwalton
r? @brson
This commit is contained in:
commit
c51ecc3223
@ -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 {
|
||||
|
@ -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); }
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ trait frobable {
|
||||
}
|
||||
|
||||
#[int_frobable]
|
||||
impl int: frobable {
|
||||
impl frobable for int {
|
||||
#[frob_attr1]
|
||||
fn frob() {
|
||||
#[frob_attr2];
|
||||
|
Loading…
x
Reference in New Issue
Block a user