@@ -199,17 +199,6 @@ fn lookup_lint(dict: lint_dict, s: str)
199
199
}
200
200
}
201
201
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
-
213
202
fn check_item ( i : @ast:: item , & & cx: ctxt , v : visit:: vt < ctxt > ) {
214
203
cx. with_warn_attrs ( i. attrs ) { |cx|
215
204
for cx. curr . each { |lint, level|
@@ -368,7 +357,7 @@ fn check_item_old_vecs(cx: ctxt, level: level, it: @ast::item) {
368
357
369
358
370
359
fn check_crate ( tcx : ty:: ctxt , crate : @ast:: crate ,
371
- lint_opts : [ ( lint , level ) ] , time_pass : bool ) {
360
+ lint_opts : [ ( lint , level ) ] ) {
372
361
373
362
fn hash_lint ( & & lint: lint ) -> uint { lint as uint }
374
363
fn eq_lint ( & & a: lint , & & b: lint ) -> bool { a == b }
@@ -386,14 +375,12 @@ fn check_crate(tcx: ty::ctxt, crate: @ast::crate,
386
375
cx. set_level ( lint, level) ;
387
376
}
388
377
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) ;
397
384
}
398
385
399
386
tcx. sess . abort_if_errors ( ) ;
0 commit comments