From ef24de24a82fe681581cc130f342363c47c0969a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 7 Jun 2024 07:48:48 +0200 Subject: Merging upstream version 1.75.0+dfsg1. Signed-off-by: Daniel Baumann --- vendor/tracing-attributes/src/expand.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'vendor/tracing-attributes/src/expand.rs') diff --git a/vendor/tracing-attributes/src/expand.rs b/vendor/tracing-attributes/src/expand.rs index eb7be8f47..a7123e523 100644 --- a/vendor/tracing-attributes/src/expand.rs +++ b/vendor/tracing-attributes/src/expand.rs @@ -66,11 +66,11 @@ pub(crate) fn gen_function<'a, B: ToTokens + 'a>( let fake_return_edge = quote_spanned! {return_span=> #[allow( unknown_lints, unreachable_code, clippy::diverging_sub_expression, - clippy::let_unit_value, clippy::unreachable, clippy::let_with_type_underscore + clippy::let_unit_value, clippy::unreachable, clippy::let_with_type_underscore, + clippy::empty_loop )] if false { - let __tracing_attr_fake_return: #return_type = - unreachable!("this is just for type inference, and is unreachable code"); + let __tracing_attr_fake_return: #return_type = loop {}; return __tracing_attr_fake_return; } }; @@ -343,7 +343,7 @@ fn gen_block( // regression in case the level is enabled. let __tracing_attr_span; let __tracing_attr_guard; - if tracing::level_enabled!(#level) { + if tracing::level_enabled!(#level) || tracing::if_log_enabled!(#level, {true} else {false}) { __tracing_attr_span = #span; #follows_from __tracing_attr_guard = __tracing_attr_span.enter(); -- cgit v1.2.3