diff --git a/Cargo.toml b/Cargo.toml index bd41f01..809a3e0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,3 +31,6 @@ mmio = [] nightly = [] pci = ["dep:pci_types"] zerocopy = ["dep:zerocopy", "dep:zerocopy-derive", "endian-num/zerocopy"] + +[lints.rust] +rust_2018_idioms = "warn" diff --git a/src/bitflags.rs b/src/bitflags.rs index 8505a98..48ed674 100644 --- a/src/bitflags.rs +++ b/src/bitflags.rs @@ -84,7 +84,7 @@ macro_rules! virtio_bitflags { macro_rules! impl_fmt { ($Trait:ident for $SelfT:ty) => { impl ::core::fmt::$Trait for $SelfT { - fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { self.0.fmt(f) } }