From 74611c9d118aae7042e9b32e114975c437be9356 Mon Sep 17 00:00:00 2001 From: Thierry Berger Date: Mon, 29 Jul 2024 10:47:52 +0200 Subject: [PATCH] fix unexpected cfg warning (#573) --- Cargo.toml | 5 +++++ bevy_rapier2d/Cargo.toml | 3 +++ bevy_rapier3d/Cargo.toml | 3 +++ 3 files changed, 11 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 01b43b09..684265ff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,11 @@ members = ["bevy_rapier2d", "bevy_rapier3d", "bevy_rapier_benches3d"] resolver = "2" +[workspace.lints] +rust.unexpected_cfgs = { level = "warn", check-cfg = [ + 'cfg(feature, values("dim2", "dim3"))', +] } + [profile.dev] # Use slightly better optimization by default, as examples otherwise seem laggy. opt-level = 1 diff --git a/bevy_rapier2d/Cargo.toml b/bevy_rapier2d/Cargo.toml index bc6edb44..6535ff7f 100644 --- a/bevy_rapier2d/Cargo.toml +++ b/bevy_rapier2d/Cargo.toml @@ -17,6 +17,9 @@ edition = "2021" path = "../src/lib.rs" required-features = ["dim2"] +[lints] +workspace = true + [features] default = ["dim2", "async-collider", "debug-render-2d"] dim2 = [] diff --git a/bevy_rapier3d/Cargo.toml b/bevy_rapier3d/Cargo.toml index ccce9042..ac470cec 100644 --- a/bevy_rapier3d/Cargo.toml +++ b/bevy_rapier3d/Cargo.toml @@ -17,6 +17,9 @@ edition = "2021" path = "../src/lib.rs" required-features = ["dim3"] +[lints] +workspace = true + [features] default = ["dim3", "async-collider", "debug-render-3d"] dim3 = []