Skip to content

Commit

Permalink
feat(hax): logging: enable trace in release, add trait-related logs
Browse files Browse the repository at this point in the history
  • Loading branch information
W95Psp committed Jun 10, 2024
1 parent 46bb5c1 commit b75187b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ syn = { version = "1.0.107", features = [
] }
tracing = { version = "0.1", features = [
"max_level_trace",
"release_max_level_warn",
"release_max_level_trace",
] }
tracing-subscriber = { version = "0.3", features = [
"env-filter",
Expand Down
5 changes: 5 additions & 0 deletions frontend/exporter/src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ pub(crate) mod search_clause {

#[extension_traits::extension(pub trait TraitPredicateExt)]
impl<'tcx, S: UnderOwnerState<'tcx>> PolyTraitPredicate<'tcx> {
#[tracing::instrument(level = "trace", skip(s))]
fn parents_trait_predicates(self, s: &S) -> Vec<(usize, PolyTraitPredicate<'tcx>)> {
let tcx = s.base().tcx;
let predicates = tcx
Expand All @@ -164,6 +165,7 @@ pub(crate) mod search_clause {
.enumerate()
.collect()
}
#[tracing::instrument(level = "trace", skip(s))]
fn associated_items_trait_predicates(
self,
s: &S,
Expand Down Expand Up @@ -191,6 +193,7 @@ pub(crate) mod search_clause {
.collect()
}

#[tracing::instrument(level = "trace", skip(s))]
fn path_to(
self,
s: &S,
Expand Down Expand Up @@ -265,6 +268,7 @@ impl ImplExprAtom {
}
}

#[tracing::instrument(level = "trace", skip(s))]
fn impl_exprs<'tcx, S: UnderOwnerState<'tcx>>(
s: &S,
obligations: &Vec<
Expand Down Expand Up @@ -306,6 +310,7 @@ impl<'tcx> IntoImplExpr<'tcx> for rustc_middle::ty::PolyTraitPredicate<'tcx> {
}
}
impl<'tcx> IntoImplExpr<'tcx> for rustc_middle::ty::PolyTraitRef<'tcx> {
#[tracing::instrument(level = "trace", skip(s))]
fn impl_expr<S: UnderOwnerState<'tcx>>(
&self,
s: &S,
Expand Down
1 change: 1 addition & 0 deletions frontend/exporter/src/types/copied.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1525,6 +1525,7 @@ pub enum AliasKind {
}

impl Alias {
#[tracing::instrument(level = "trace", skip(s))]
fn from<'tcx, S: BaseState<'tcx> + HasOwnerId>(
s: &S,
alias_kind: &rustc_type_ir::sty::AliasKind,
Expand Down

0 comments on commit b75187b

Please sign in to comment.