Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(hax): logging: enable tracing in release, add trait-related logs #710

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading