Skip to content

Commit d633782

Browse files
committed
---
yaml --- r: 276159 b: refs/heads/master c: e56121c h: refs/heads/master i: 276157: 83e0df9 276155: c588d1b 276151: b0575dc 276143: 88e5ffa 276127: 95c7e04 276095: bed1301
1 parent 65f53cb commit d633782

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 9a9c9afbe265b1fc9dbb1ed8bdb9b82523badf9c
2+
refs/heads/master: e56121c584893d8b46af5e4cd5d580d30f221d9f
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
44
refs/heads/try: 49312a405e14a449b98fe0056b12a40ac128be4a
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

trunk/src/libsyntax/errors/snippet/mod.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ pub enum RenderedLineKind {
103103
Annotations,
104104
Elision,
105105
}
106-
use self::RenderedLineKind::*;
106+
use self::RenderedLineKind as RLK;
107107

108108
impl SnippetData {
109109
pub fn new(codemap: Rc<CodeMap>,
@@ -244,19 +244,19 @@ impl RenderedLine {
244244
impl RenderedLineKind {
245245
fn prefix(&self) -> StyledString {
246246
match *self {
247-
SourceText { file: _, line_index } =>
247+
RLK::SourceText { file: _, line_index } =>
248248
StyledString {
249249
text: format!("{}", line_index + 1),
250250
style: LineNumber,
251251
},
252-
Elision =>
252+
RLK::Elision =>
253253
StyledString {
254254
text: String::from("..."),
255255
style: LineNumber,
256256
},
257-
PrimaryFileName |
258-
OtherFileName |
259-
Annotations =>
257+
RLK::PrimaryFileName |
258+
RLK::OtherFileName |
259+
RLK::Annotations =>
260260
StyledString {
261261
text: String::from(""),
262262
style: LineNumber,
@@ -296,7 +296,7 @@ impl StyledBuffer {
296296
//We know our first output line is source and the rest are highlights and labels
297297
output.push(RenderedLine { text: styled_vec, kind: source_kind.clone() });
298298
} else {
299-
output.push(RenderedLine { text: styled_vec, kind: Annotations });
299+
output.push(RenderedLine { text: styled_vec, kind: RLK::Annotations });
300300
}
301301
styled_vec = vec![];
302302
}
@@ -484,7 +484,7 @@ impl FileInfo {
484484
text: format!(":{}:{}", lo.line, lo.col.0 + 1),
485485
style: LineAndColumn,
486486
}],
487-
kind: PrimaryFileName,
487+
kind: RLK::PrimaryFileName,
488488
});
489489
}
490490
None => {
@@ -493,7 +493,7 @@ impl FileInfo {
493493
text: self.file.name.clone(),
494494
style: FileNameStyle,
495495
}],
496-
kind: OtherFileName,
496+
kind: RLK::OtherFileName,
497497
});
498498
}
499499
}
@@ -534,7 +534,7 @@ impl FileInfo {
534534
if prev_ends_at_eol && is_single_unlabeled_annotated_line {
535535
if !elide_unlabeled_region {
536536
output.push(RenderedLine::from((String::new(),
537-
NoStyle, Elision)));
537+
NoStyle, RLK::Elision)));
538538
elide_unlabeled_region = true;
539539
prev_ends_at_eol = true;
540540
}
@@ -548,7 +548,7 @@ impl FileInfo {
548548
}
549549
} else {
550550
if group.len() > 1 {
551-
output.push(RenderedLine::from((String::new(), NoStyle, Elision)));
551+
output.push(RenderedLine::from((String::new(), NoStyle, RLK::Elision)));
552552
} else {
553553
let mut v: Vec<RenderedLine> =
554554
group.iter().flat_map(|line| self.render_line(line)).collect();
@@ -563,7 +563,7 @@ impl FileInfo {
563563
fn render_line(&self, line: &Line) -> Vec<RenderedLine> {
564564
let source_string = self.file.get_line(line.line_index)
565565
.unwrap_or("");
566-
let source_kind = SourceText {
566+
let source_kind = RLK::SourceText {
567567
file: self.file.clone(),
568568
line_index: line.line_index,
569569
};

0 commit comments

Comments
 (0)