diff options
Diffstat (limited to '')
-rw-r--r-- | vendor/tracing-attributes/src/expand.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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<B: ToTokens>( // 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(); |