diff options
| author | bors <bors@rust-lang.org> | 2013-02-13 15:49:01 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-02-13 15:49:01 -0800 |
| commit | c51ecc3223ed64b7948f40097c5083da0c201811 (patch) | |
| tree | befabb90fa8280bb56efc9d6070b7a14924fd29e | |
| parent | d5bf3b85d1078f3a2dd4cb9f009af018c2b4c062 (diff) | |
| parent | 754718c91018ec1623425521f86f105360739444 (diff) | |
| download | rust-c51ecc3223ed64b7948f40097c5083da0c201811.tar.gz rust-c51ecc3223ed64b7948f40097c5083da0c201811.zip | |
auto merge of #4884 : pcwalton/rust/pretty-print-new-impl-syntax, r=pcwalton
r? @brson
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 6 | ||||
| -rw-r--r-- | src/test/run-pass/class-attributes-1.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/method-attributes.rs | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index dec9f5abd6a..7a60696c0a2 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -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 { diff --git a/src/test/run-pass/class-attributes-1.rs b/src/test/run-pass/class-attributes-1.rs index 9382cc8ac34..b7ecb622e7f 100644 --- a/src/test/run-pass/class-attributes-1.rs +++ b/src/test/run-pass/class-attributes-1.rs @@ -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); } } diff --git a/src/test/run-pass/method-attributes.rs b/src/test/run-pass/method-attributes.rs index e3d4a2aff9f..20cd9643b08 100644 --- a/src/test/run-pass/method-attributes.rs +++ b/src/test/run-pass/method-attributes.rs @@ -19,7 +19,7 @@ trait frobable { } #[int_frobable] -impl int: frobable { +impl frobable for int { #[frob_attr1] fn frob() { #[frob_attr2]; |
