diff options
| author | bors <bors@rust-lang.org> | 2013-03-05 12:12:50 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-03-05 12:12:50 -0800 |
| commit | dec599f652dbafe9a4f5ec6ba63023d1eae89a08 (patch) | |
| tree | 837f83c1a505cf0c091b3face81eb78120e8288a /src/libsyntax | |
| parent | 4c8e12ea97916b15f14faeac74cd5bee1789f9ac (diff) | |
| parent | 2fa2ad59958d0028c856fb68359edb9a7bd9cab8 (diff) | |
| download | rust-dec599f652dbafe9a4f5ec6ba63023d1eae89a08.tar.gz rust-dec599f652dbafe9a4f5ec6ba63023d1eae89a08.zip | |
auto merge of #5234 : pcwalton/rust/equiv, r=pcwalton
r? @nikomatsakis
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index dd179171fce..5013b2c919f 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -3112,7 +3112,7 @@ pub impl Parser { fn parse_trait_ref_list(&self, ket: &token::Token) -> ~[@trait_ref] { self.parse_seq_to_before_end( ket, - seq_sep_none(), + seq_sep_trailing_disallowed(token::BINOP(token::PLUS)), |p| p.parse_trait_ref() ) } diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 735344e43be..d307e3964e7 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -600,8 +600,11 @@ pub fn print_item(s: @ps, &&item: @ast::item) { print_generics(s, generics); if traits.len() != 0u { word(s.s, ~":"); - for traits.each |trait_| { + for traits.eachi |i, trait_| { nbsp(s); + if i != 0 { + word_space(s, ~"+"); + } print_path(s, trait_.path, false); } } |
