From 7a876609a23eb9c140fffeae625dd9272e4e48e0 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Mon, 27 Jan 2025 18:56:32 +0900 Subject: [PATCH] Use [lints] to address unexpected_cfgs lint (#762) --- Cargo.toml | 5 +++++ src/lib.rs | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index ed385d1..7dfc48e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,3 +33,8 @@ loom = "0.7" [package.metadata.docs.rs] rustdoc-args = ["--cfg", "docsrs"] + +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = [ + 'cfg(loom)', +] } diff --git a/src/lib.rs b/src/lib.rs index cfc8281..08c4249 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,3 @@ -#![allow(unknown_lints, unexpected_cfgs)] #![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)] #![doc(test( no_crate_inject,