diff options
| author | bors <bors@rust-lang.org> | 2013-09-18 04:15:56 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-09-18 04:15:56 -0700 |
| commit | b8d3496528a036117bcf04e2e448e28a69ccd909 (patch) | |
| tree | 31662da894ae7f6baee63d32791ec93d9450ce80 /src/libsyntax | |
| parent | adb638f54d7d9a3bf2f66fa654a5dcd816a4b427 (diff) | |
| parent | 823ebb14ba6ed99df1198c6d1b47c5d2964196da (diff) | |
| download | rust-b8d3496528a036117bcf04e2e448e28a69ccd909.tar.gz rust-b8d3496528a036117bcf04e2e448e28a69ccd909.zip | |
auto merge of #9264 : ben0x539/rust/pp-work, r=alexcrichton
Since 3b6314c the pretty printer seems to only print trait bounds for `ast::ty_path(...)`s that have a generics arguments list. That seems wrong, so let's always print them. Closes #9253, un-xfails test for #7673.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/print/pp.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/libsyntax/print/pp.rs b/src/libsyntax/print/pp.rs index af2a4977082..615f3301373 100644 --- a/src/libsyntax/print/pp.rs +++ b/src/libsyntax/print/pp.rs @@ -243,7 +243,7 @@ pub fn mk_printer(out: @io::Writer, linewidth: uint) -> @mut Printer { * the entire buffered window, but can't output anything until the size is >= * 0 (sizes are set to negative while they're pending calculation). * - * So SCAN takeks input and buffers tokens and pending calculations, while + * So SCAN takes input and buffers tokens and pending calculations, while * PRINT gobbles up completed calculations and tokens from the buffer. The * theory is that the two can never get more than 3N tokens apart, because * once there's "obviously" too much data to fit on a line, in a size diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index ec84cbda973..b5868cbc63d 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -1535,15 +1535,15 @@ fn print_path_(s: @ps, print_ident(s, segment.identifier); - if segment.lifetime.is_some() || !segment.types.is_empty() { - // If this is the last segment, print the bounds. - if i == path.segments.len() - 1 { - match *opt_bounds { - None => {} - Some(ref bounds) => print_bounds(s, bounds, true), - } + // If this is the last segment, print the bounds. + if i == path.segments.len() - 1 { + match *opt_bounds { + None => {} + Some(ref bounds) => print_bounds(s, bounds, true), } + } + if segment.lifetime.is_some() || !segment.types.is_empty() { if colons_before_params { word(s.s, "::") } |
