Skip to content

Commit 0b155bd

Browse files
committed
---
yaml --- r: 277935 b: refs/heads/auto c: f6496cd h: refs/heads/master i: 277933: 0cefc8d 277931: 87a5be4 277927: 5488818 277919: d0325e5
1 parent e13fa34 commit 0b155bd

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: d5529f000da43fe2e9f2aad03f747b0144da9354
11+
refs/heads/auto: f6496cd3700a9a4e3dc1a6d3245287066f4b99e4
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/src/libsyntax/errors/emitter.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ pub struct EmitterWriter {
131131
dst: Destination,
132132
registry: Option<diagnostics::registry::Registry>,
133133
cm: Rc<codemap::CodeMap>,
134+
135+
/// Is this the first error emitted thus far? If not, we emit a
136+
/// `\n` before the top-level errors.
134137
first: bool,
135138
}
136139

@@ -172,7 +175,9 @@ impl EmitterWriter {
172175
EmitterWriter { dst: dst, registry: registry, cm: code_map, first: true }
173176
} else {
174177
EmitterWriter { dst: Raw(Box::new(io::stderr())),
175-
registry: registry, cm: code_map, first: true }
178+
registry: registry,
179+
cm: code_map,
180+
first: true }
176181
}
177182
}
178183

branches/auto/src/libsyntax/errors/snippet/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ use std::rc::Rc;
1616
use std::mem;
1717
use std::ops::Range;
1818

19-
#[cfg(test)]
2019
mod test;
2120

2221
pub struct SnippetData {
@@ -210,8 +209,7 @@ impl<S> From<(S, Style, RenderedLineKind)> for RenderedLine
210209
impl<S1,S2> From<(S1, Style, S2, Style, RenderedLineKind)> for RenderedLine
211210
where S1: StringSource, S2: StringSource
212211
{
213-
fn from(tuple: (S1, Style, S2, Style, RenderedLineKind))
214-
-> Self {
212+
fn from(tuple: (S1, Style, S2, Style, RenderedLineKind)) -> Self {
215213
let (text1, style1, text2, style2, kind) = tuple;
216214
RenderedLine {
217215
text: vec![

branches/auto/src/libsyntax/errors/snippet/test.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -10,6 +10,8 @@
1010

1111
// Code for testing annotated snippets.
1212

13+
#![cfg(test)]
14+
1315
use codemap::{BytePos, CodeMap, FileMap, NO_EXPANSION, Span};
1416
use std::rc::Rc;
1517
use super::{RenderedLine, SnippetData};

0 commit comments

Comments
 (0)