Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use workspace lints to control unexpected_cfgs. #682

Merged
merged 2 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ members = ["crates/rapier2d", "crates/rapier2d-f64", "crates/rapier_testbed2d",
"crates/rapier3d", "crates/rapier3d-f64", "crates/rapier_testbed3d", "crates/rapier_testbed3d-f64", "examples3d", "examples3d-f64", "benchmarks3d", "crates/rapier3d-urdf", "crates/rapier3d-stl"]
resolver = "2"

[workspace.lints]
rust.unexpected_cfgs = { level = "warn", check-cfg = [
'cfg(feature, values("dim2", "dim3", "f32", "f64"))',
# The `other-backends` feature isn't in the tested3d-f64
# but easier to just ignore it here.
'cfg(feature, values("other-backends"))',
] }

[patch.crates-io]
#wrapped2d = { git = "https://github.com/Bastacyclop/rust_box2d.git" }
#xurdf = { path = "../xurdf/xurdf" }
Expand Down
3 changes: 3 additions & 0 deletions crates/rapier2d-f64/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ edition = "2021"
[badges]
maintenance = { status = "actively-developed" }

[lints]
workspace = true

[features]
default = ["dim2", "f64"]
dim2 = []
Expand Down
3 changes: 3 additions & 0 deletions crates/rapier2d/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ edition = "2021"
[badges]
maintenance = { status = "actively-developed" }

[lints]
workspace = true

[features]
default = ["dim2", "f32"]
dim2 = []
Expand Down
3 changes: 3 additions & 0 deletions crates/rapier3d-f64/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ edition = "2021"
[badges]
maintenance = { status = "actively-developed" }

[lints]
workspace = true

[features]
default = ["dim3", "f64"]
dim3 = []
Expand Down
3 changes: 3 additions & 0 deletions crates/rapier3d/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ edition = "2021"
[badges]
maintenance = { status = "actively-developed" }

[lints]
workspace = true

[features]
default = ["dim3", "f32"]
dim3 = []
Expand Down
3 changes: 3 additions & 0 deletions crates/rapier_testbed2d-f64/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ name = "rapier_testbed2d"
path = "../../src_testbed/lib.rs"
required-features = ["dim2"]

[lints]
workspace = true

[features]
default = ["dim2"]
dim2 = []
Expand Down
3 changes: 3 additions & 0 deletions crates/rapier_testbed2d/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ name = "rapier_testbed2d"
path = "../../src_testbed/lib.rs"
required-features = ["dim2"]

[lints]
workspace = true

[features]
default = ["dim2"]
dim2 = []
Expand Down
3 changes: 3 additions & 0 deletions crates/rapier_testbed3d-f64/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ name = "rapier_testbed3d"
path = "../../src_testbed/lib.rs"
required-features = ["dim3"]

[lints]
workspace = true

[features]
default = ["dim3"]
dim3 = []
Expand Down
3 changes: 3 additions & 0 deletions crates/rapier_testbed3d/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ name = "rapier_testbed3d"
path = "../../src_testbed/lib.rs"
required-features = ["dim3"]

[lints]
workspace = true

[features]
default = ["dim3"]
dim3 = []
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#![allow(clippy::too_many_arguments)]
#![allow(clippy::needless_range_loop)] // TODO: remove this? I find that in the math code using indices adds clarity.
#![allow(clippy::module_inception)]
#![allow(unexpected_cfgs)] // This happens due to the dim2/dim3/f32/f64 cfg.

#[cfg(all(feature = "dim2", feature = "f32"))]
pub extern crate parry2d as parry;
Expand Down
1 change: 0 additions & 1 deletion src_testbed/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![allow(clippy::too_many_arguments)]
#![allow(unexpected_cfgs)] // This happens due to the dim2/dim3/f32/f64 cfg.

extern crate nalgebra as na;

Expand Down