Skip to content

Commit

Permalink
Allow unused_tuple lint under the new dead_code name
Browse files Browse the repository at this point in the history
As of at least rust 1.77 nightly, the compiler warns that the
`unused_tuple_struct_field` lint has been subsumed under
`dead_code`. Allow both lints in the relevant field here.

This still warns about the old name on nightly but helps
with the severity of the warning for those building with a
nightly toolchain and is less likely regress builds with
future stable toolchains.
  • Loading branch information
rillian committed Feb 1, 2024
1 parent ff3255f commit f5fbc31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion time-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ enum FormatDescriptionVersion {
#[cfg(any(feature = "formatting", feature = "parsing"))]
enum VersionOrModuleName {
Version(FormatDescriptionVersion),
#[cfg_attr(not(feature = "serde"), allow(unused_tuple_struct_fields))]
#[cfg_attr(not(feature = "serde"), allow(dead_code, unused_tuple_struct_fields))]
ModuleName(Ident),
}

Expand Down

0 comments on commit f5fbc31

Please sign in to comment.