Skip to content

Commit 8222fa4

Browse files
committed
Use the std::term color constants in the codemap
Exported constants work now. Woo!
1 parent 5d6fe1a commit 8222fa4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/comp/syntax/codemap.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,13 @@ fn maybe_highlight_lines(sp: option::t<span>, cm: codemap,
183183
}
184184

185185
fn emit_warning(sp: option::t<span>, msg: str, cm: codemap) {
186-
emit_diagnostic(sp, msg, "warning", 11u8, cm);
186+
emit_diagnostic(sp, msg, "warning", term::color_bright_yellow, cm);
187187
}
188188
fn emit_error(sp: option::t<span>, msg: str, cm: codemap) {
189-
emit_diagnostic(sp, msg, "error", 9u8, cm);
189+
emit_diagnostic(sp, msg, "error", term::color_bright_red, cm);
190190
}
191191
fn emit_note(sp: option::t<span>, msg: str, cm: codemap) {
192-
emit_diagnostic(sp, msg, "note", 10u8, cm);
192+
emit_diagnostic(sp, msg, "note", term::color_bright_green, cm);
193193
}
194194

195195
type file_lines = {name: str, lines: [uint]};

0 commit comments

Comments
 (0)