Add some time statements
This commit is contained in:
parent
eb8fb53425
commit
8d76060785
1 changed files with 6 additions and 3 deletions
|
|
@ -9,6 +9,7 @@ use hir::def_id::{DefId, LOCAL_CRATE};
|
|||
use rustc::traits;
|
||||
use rustc::ty::{self, TyCtxt, TypeFoldable};
|
||||
use rustc::ty::query::Providers;
|
||||
use rustc::util::common::time;
|
||||
|
||||
use syntax::ast;
|
||||
|
||||
|
|
@ -132,7 +133,9 @@ fn coherent_trait<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) {
|
|||
for &impl_id in impls {
|
||||
check_impl_overlap(tcx, impl_id);
|
||||
}
|
||||
builtin::check_trait(tcx, def_id);
|
||||
use rustc::util::common::time;
|
||||
time(tcx.sess, "builtin::check_trait checking", ||
|
||||
builtin::check_trait(tcx, def_id));
|
||||
}
|
||||
|
||||
pub fn check_coherence<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) {
|
||||
|
|
@ -140,8 +143,8 @@ pub fn check_coherence<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) {
|
|||
tcx.ensure().coherent_trait(trait_def_id);
|
||||
}
|
||||
|
||||
unsafety::check(tcx);
|
||||
orphan::check(tcx);
|
||||
time(tcx.sess, "unsafety checking", || unsafety::check(tcx));
|
||||
time(tcx.sess, "orphan checking", || orphan::check(tcx));
|
||||
|
||||
// these queries are executed for side-effects (error reporting):
|
||||
tcx.ensure().crate_inherent_impls(LOCAL_CRATE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue