diff options
| author | Jonathan Turner <jturner@mozilla.com> | 2016-07-12 16:10:01 -0400 |
|---|---|---|
| committer | Jonathan Turner <jturner@mozilla.com> | 2016-07-14 07:57:46 -0400 |
| commit | 012ff15c94ff44f45c07641bdd0957da6a625591 (patch) | |
| tree | a58569e556f4d5842782b869667d3fc06ff90cce /src/librustc_errors | |
| parent | 2f2c3e178325dc1837badcd7573c2c0905fab979 (diff) | |
| download | rust-012ff15c94ff44f45c07641bdd0957da6a625591.tar.gz rust-012ff15c94ff44f45c07641bdd0957da6a625591.zip | |
Fix up some tidy-unfriendly spacing
Diffstat (limited to 'src/librustc_errors')
| -rw-r--r-- | src/librustc_errors/emitter.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs index 901cd3403c1..8a5aea853f1 100644 --- a/src/librustc_errors/emitter.rs +++ b/src/librustc_errors/emitter.rs @@ -534,7 +534,7 @@ impl EmitterWriter { // Put in the spacer between the location and annotated source let buffer_msg_line_offset = buffer.num_lines(); - draw_col_separator(&mut buffer, buffer_msg_line_offset, max_line_num_len + 1); + draw_col_separator_no_space(&mut buffer, buffer_msg_line_offset, max_line_num_len + 1); // Next, output the annotate source for this file for line_idx in 0..annotated_file.lines.len() { @@ -636,7 +636,7 @@ impl EmitterWriter { Ok(()) => { if !db.children.is_empty() { let mut buffer = StyledBuffer::new(); - draw_col_separator(&mut buffer, 0, max_line_num_len + 1); + draw_col_separator_no_space(&mut buffer, 0, max_line_num_len + 1); match emit_to_destination(&buffer.render(), &db.level, &mut self.dst) { Ok(()) => (), Err(e) => panic!("failed to emit error: {}", e) @@ -948,6 +948,10 @@ fn draw_col_separator(buffer: &mut StyledBuffer, line: usize, col: usize) { buffer.puts(line, col, "| ", Style::LineNumber); } +fn draw_col_separator_no_space(buffer: &mut StyledBuffer, line: usize, col: usize) { + buffer.puts(line, col, "|", Style::LineNumber); +} + fn draw_note_separator(buffer: &mut StyledBuffer, line: usize, col: usize) { buffer.puts(line, col, "= ", Style::LineNumber); } @@ -1087,4 +1091,4 @@ impl Write for Destination { Raw(ref mut w) => w.flush(), } } -} +} \ No newline at end of file |
