From aee5f31c682664bd2e42be6b3fefdd3dd8a390e8 Mon Sep 17 00:00:00 2001 From: Jack Wrenn Date: Thu, 21 Jul 2022 21:57:51 +0000 Subject: [PATCH] safe transmute: lowercase tracing levels ref: https://github.com/rust-lang/rust/pull/92268#discussion_r927095154 --- compiler/rustc_transmute/src/layout/dfa.rs | 2 +- compiler/rustc_transmute/src/maybe_transmutable/mod.rs | 8 ++++---- .../src/maybe_transmutable/query_context.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/compiler/rustc_transmute/src/layout/dfa.rs b/compiler/rustc_transmute/src/layout/dfa.rs index f2742dc8ee5a..09a60cf6a626 100644 --- a/compiler/rustc_transmute/src/layout/dfa.rs +++ b/compiler/rustc_transmute/src/layout/dfa.rs @@ -103,7 +103,7 @@ where Self { transitions, start, accepting } } - #[instrument(level = "DEBUG")] + #[instrument(level = "debug")] #[cfg_attr(feature = "rustc", allow(rustc::potential_query_instability))] pub(crate) fn from_nfa(nfa: Nfa) -> Self { let Nfa { transitions: nfa_transitions, start: nfa_start, accepting: nfa_accepting } = nfa; diff --git a/compiler/rustc_transmute/src/maybe_transmutable/mod.rs b/compiler/rustc_transmute/src/maybe_transmutable/mod.rs index 8fb85527a0f0..076d922d1b72 100644 --- a/compiler/rustc_transmute/src/maybe_transmutable/mod.rs +++ b/compiler/rustc_transmute/src/maybe_transmutable/mod.rs @@ -64,7 +64,7 @@ mod rustc { impl<'tcx> MaybeTransmutableQuery, TyCtxt<'tcx>> { /// This method begins by converting `src` and `dst` from `Ty`s to `Tree`s, /// then computes an answer using those trees. - #[instrument(level = "DEBUG", skip(self), fields(src = ?self.src, dst = ?self.dst))] + #[instrument(level = "debug", skip(self), fields(src = ?self.src, dst = ?self.dst))] pub fn answer(self) -> Answer< as QueryContext>::Ref> { let query_or_answer = self.map_layouts(|src, dst, scope, &context| { // Convert `src` and `dst` from their rustc representations, to `Tree`-based @@ -103,7 +103,7 @@ where /// This method begins by de-def'ing `src` and `dst`, and prunes private paths from `dst`, /// then converts `src` and `dst` to `Nfa`s, and computes an answer using those NFAs. #[inline(always)] - #[instrument(level = "DEBUG", skip(self), fields(src = ?self.src, dst = ?self.dst))] + #[instrument(level = "debug", skip(self), fields(src = ?self.src, dst = ?self.dst))] pub(crate) fn answer(self) -> Answer<::Ref> { let assume_visibility = self.assume.visibility; let query_or_answer = self.map_layouts(|src, dst, scope, context| { @@ -152,7 +152,7 @@ where /// /// This method converts `src` and `dst` to DFAs, then computes an answer using those DFAs. #[inline(always)] - #[instrument(level = "DEBUG", skip(self), fields(src = ?self.src, dst = ?self.dst))] + #[instrument(level = "debug", skip(self), fields(src = ?self.src, dst = ?self.dst))] pub(crate) fn answer(self) -> Answer<::Ref> { let query_or_answer = self .map_layouts(|src, dst, scope, context| Ok((Dfa::from_nfa(src), Dfa::from_nfa(dst)))); @@ -192,7 +192,7 @@ where } #[inline(always)] - #[instrument(level = "DEBUG", skip(self))] + #[instrument(level = "debug", skip(self))] fn answer_memo( &self, cache: &mut Map<(dfa::State, dfa::State), Answer<::Ref>>, diff --git a/compiler/rustc_transmute/src/maybe_transmutable/query_context.rs b/compiler/rustc_transmute/src/maybe_transmutable/query_context.rs index 1a66b6cfe00e..9c2cf4c9a923 100644 --- a/compiler/rustc_transmute/src/maybe_transmutable/query_context.rs +++ b/compiler/rustc_transmute/src/maybe_transmutable/query_context.rs @@ -52,7 +52,7 @@ mod rustc { type Scope = Ty<'tcx>; - #[instrument(level = "DEBUG", skip(self))] + #[instrument(level = "debug", skip(self))] fn is_accessible_from(&self, def: Self::Def, scope: Self::Scope) -> bool { use layout::rustc::Def; use rustc_middle::ty;