Skip to content

Commit b78b945

Browse files
committed
---
yaml --- r: 3247 b: refs/heads/master c: 7fe9a88 h: refs/heads/master i: 3245: 851acd4 3243: e679b63 3239: 2190962 3231: 5551c55 v: v3
1 parent cc54ef8 commit b78b945

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: c394a7f49ac29a099994e243017065de2ff97f2a
2+
refs/heads/master: 7fe9a88e31ae07f2fd89f6715efedd7e3edf49e6

trunk/src/comp/driver/rustc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ fn build_session(@session::options sopts) -> session::session {
272272
auto target_crate_num = 0;
273273
auto sess =
274274
session::session(target_crate_num, target_cfg, sopts, crate_cache,
275-
front::codemap::new_codemap());
275+
front::codemap::new_codemap(), 0u);
276276
ret sess;
277277
}
278278

trunk/src/comp/driver/session.rs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ obj session(ast::crate_num cnum,
6666
@config targ_cfg,
6767
@options opts,
6868
map::hashmap[int, crate_metadata] crates,
69-
codemap::codemap cm) {
69+
codemap::codemap cm,
70+
mutable uint err_count) {
7071
fn get_targ_cfg() -> @config { ret targ_cfg; }
7172
fn get_opts() -> @options { ret opts; }
7273
fn get_targ_crate_num() -> ast::crate_num { ret cnum; }
@@ -80,6 +81,19 @@ obj session(ast::crate_num cnum,
8081
emit_diagnostic(none[span], msg, "error", 9u8, cm);
8182
fail;
8283
}
84+
fn span_err(span sp, str msg) {
85+
emit_diagnostic(some(sp), msg, "error", 9u8, cm);
86+
err_count += 1u;
87+
}
88+
fn err(span sp, str msg) {
89+
emit_diagnostic(some(sp), msg, "error", 9u8, cm);
90+
err_count += 1u;
91+
}
92+
fn abort_if_errors() {
93+
if (err_count > 0u) {
94+
self.fatal("aborting due to previous errors");
95+
}
96+
}
8397
fn span_warn(span sp, str msg) {
8498
// FIXME: Use constants, but rustboot doesn't know how to export them.
8599

0 commit comments

Comments
 (0)