Skip to content

Commit ebd437c

Browse files
authored
attributes: allow unknown_lints in generated code (#2626)
## Motivation #2609 added an allow to generated code to allow a lint that was added in Clippy 1.70.0. This was released with a patch bump so anyone who uses an older version and latest tracing gets a compilation warning about an unkonwn lint. ## Solution Allowing unkonwn lints should fix this now and prevent similar issues in the future. If the lints are unknown it will most likely be because the lints are introduced only in newer compiler. There is just a higher risk that a future contributor tries to add another allow and if they make a typo, the issue will not be caught.
1 parent c14525e commit ebd437c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tracing-attributes/src/expand.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ pub(crate) fn gen_function<'a, B: ToTokens + 'a>(
6565
// exactly that way for it to do its magic.
6666
let fake_return_edge = quote_spanned! {return_span=>
6767
#[allow(
68-
unreachable_code, clippy::diverging_sub_expression, clippy::let_unit_value,
69-
clippy::unreachable, clippy::let_with_type_underscore
68+
unknown_lints, unreachable_code, clippy::diverging_sub_expression,
69+
clippy::let_unit_value, clippy::unreachable, clippy::let_with_type_underscore
7070
)]
7171
if false {
7272
let __tracing_attr_fake_return: #return_type =

0 commit comments

Comments
 (0)