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 77f5b841..b15d611b 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 = []