Skip to content

Commit 0a9e5b9

Browse files
committed
---
yaml --- r: 13167 b: refs/heads/master c: d1a65da h: refs/heads/master i: 13165: 4a5efe3 13163: 75e5c11 13159: c1f7f31 13151: 121a234 v: v3
1 parent fe38ed6 commit 0a9e5b9

File tree

3 files changed

+10
-22
lines changed

3 files changed

+10
-22
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: af228711e5f7a3aa5db5cdcefcc5a8f7a91ff675
2+
refs/heads/master: d1a65da835730aa91a80cfc6011dd5a21f0a95e6
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/src/rustc/driver/driver.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ fn compile_upto(sess: session, cfg: ast::crate_cfg,
205205
time(time_passes, "kind checking",
206206
bind kind::check_crate(ty_cx, method_map, last_use_map, crate));
207207

208-
lint::check_crate(ty_cx, crate, sess.opts.lint_opts, time_passes);
208+
time(time_passes, "lint checking",
209+
bind lint::check_crate(ty_cx, crate, sess.opts.lint_opts));
209210

210211
if upto == cu_no_trans { ret {crate: crate, tcx: some(ty_cx)}; }
211212
let outputs = option::get(outputs);

trunk/src/rustc/middle/lint.rs

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -199,17 +199,6 @@ fn lookup_lint(dict: lint_dict, s: str)
199199
}
200200
}
201201

202-
203-
// FIXME: Copied from driver.rs, to work around a bug(#1566)
204-
fn time(do_it: bool, what: str, thunk: fn()) {
205-
if !do_it{ ret thunk(); }
206-
let start = std::time::precise_time_s();
207-
thunk();
208-
let end = std::time::precise_time_s();
209-
io::stdout().write_str(#fmt("time: %3.3f s\t%s\n",
210-
end - start, what));
211-
}
212-
213202
fn check_item(i: @ast::item, &&cx: ctxt, v: visit::vt<ctxt>) {
214203
cx.with_warn_attrs(i.attrs) {|cx|
215204
for cx.curr.each {|lint, level|
@@ -368,7 +357,7 @@ fn check_item_old_vecs(cx: ctxt, level: level, it: @ast::item) {
368357

369358

370359
fn check_crate(tcx: ty::ctxt, crate: @ast::crate,
371-
lint_opts: [(lint, level)], time_pass: bool) {
360+
lint_opts: [(lint, level)]) {
372361

373362
fn hash_lint(&&lint: lint) -> uint { lint as uint }
374363
fn eq_lint(&&a: lint, &&b: lint) -> bool { a == b }
@@ -386,14 +375,12 @@ fn check_crate(tcx: ty::ctxt, crate: @ast::crate,
386375
cx.set_level(lint, level);
387376
}
388377

389-
time(time_pass, "lint checking") {||
390-
cx.with_warn_attrs(crate.node.attrs) {|cx|
391-
let visit = visit::mk_vt(@{
392-
visit_item: check_item
393-
with *visit::default_visitor()
394-
});
395-
visit::visit_crate(*crate, cx, visit);
396-
}
378+
cx.with_warn_attrs(crate.node.attrs) {|cx|
379+
let visit = visit::mk_vt(@{
380+
visit_item: check_item
381+
with *visit::default_visitor()
382+
});
383+
visit::visit_crate(*crate, cx, visit);
397384
}
398385

399386
tcx.sess.abort_if_errors();

0 commit comments

Comments
 (0)