Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/libsyntax/print/pprust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/class-attributes-1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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); }
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/method-attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ trait frobable {
}

#[int_frobable]
impl int: frobable {
impl frobable for int {
#[frob_attr1]
fn frob() {
#[frob_attr2];
Expand Down