Skip to content

Commit b81103c

Browse files
committed
Disable lints.rust.unexpected_cfgs, which causes warnings on (still supported) stable compilers
1 parent 779c41c commit b81103c

File tree

8 files changed

+24
-14
lines changed

8 files changed

+24
-14
lines changed

godot-bindings/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,6 @@ regex = { version = "1.5.5", default-features = false, features = ["std", "unico
7171
features = ["experimental-godot-api"]
7272
rustdoc-args = ["--cfg", "published_docs"]
7373

74-
[lints.rust]
75-
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(published_docs)'] }
74+
# Currently causes "unused manifest key" warnings. Maybe re-enable in the future, to make `published_docs` known.
75+
#[lints.rust]
76+
#unexpected_cfgs = { level = "warn", check-cfg = ['cfg(published_docs)'] }

godot-bindings/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ pub fn emit_godot_version_cfg() {
133133
// This could also be done as `KNOWN_API_VERSIONS.len() - 1`, but this is more explicit.
134134
let all_versions = import::ALL_VERSIONS;
135135

136+
// Make `published_docs` #[cfg] known. This could be moved to Cargo.toml of all crates in the future.
137+
println!(r#"cargo:rustc-check-cfg=published_docs"#);
138+
136139
// Emit `rustc-check-cfg` for all minor versions (patch .0), so Cargo doesn't complain when we use the #[cfg]s.
137140
for (_, minor, patch) in all_versions.iter().copied() {
138141
if minor > 0 && patch == 0 {

godot-cell/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@ proptest = { version = "1.4.0", optional = true }
1818
features = ["experimental-godot-api"]
1919
rustdoc-args = ["--cfg", "published_docs"]
2020

21-
[lints.rust]
22-
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(published_docs)'] }
21+
# Currently causes "unused manifest key" warnings. Maybe re-enable in the future, to make `published_docs` known.
22+
#[lints.rust]
23+
#unexpected_cfgs = { level = "warn", check-cfg = ['cfg(published_docs)'] }

godot-codegen/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ godot-bindings = { path = "../godot-bindings" } # emit_godot_version_cfg
3838
features = ["experimental-godot-api"]
3939
rustdoc-args = ["--cfg", "published_docs"]
4040

41-
[lints.rust]
42-
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(published_docs)'] }
41+
# Currently causes "unused manifest key" warnings. Maybe re-enable in the future, to make `published_docs` known.
42+
#[lints.rust]
43+
#unexpected_cfgs = { level = "warn", check-cfg = ['cfg(published_docs)'] }
4344

4445
# To check formatter: Disabled below, since it pulls in too many dependencies during `cargo test` but is not really used.
4546
# Dev-dependencies cannot be optional and feature-gated. Enable manually when needed.

godot-core/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,6 @@ godot-codegen = { path = "../godot-codegen" }
4646
features = ["experimental-godot-api"]
4747
rustdoc-args = ["--cfg", "published_docs"]
4848

49-
[lints.rust]
50-
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(published_docs)'] }
49+
# Currently causes "unused manifest key" warnings. Maybe re-enable in the future, to make `published_docs` known.
50+
#[lints.rust]
51+
#unexpected_cfgs = { level = "warn", check-cfg = ['cfg(published_docs)'] }

godot-ffi/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,6 @@ godot-codegen = { path = "../godot-codegen" }
3838
features = ["experimental-godot-api"]
3939
rustdoc-args = ["--cfg", "published_docs"]
4040

41-
[lints.rust]
42-
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(published_docs)'] }
41+
# Currently causes "unused manifest key" warnings. Maybe re-enable in the future, to make `published_docs` known.
42+
#[lints.rust]
43+
#unexpected_cfgs = { level = "warn", check-cfg = ['cfg(published_docs)'] }

godot-macros/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,6 @@ godot-bindings = { path = "../godot-bindings" } # emit_godot_version_cfg
3232
features = ["experimental-godot-api"]
3333
rustdoc-args = ["--cfg", "published_docs"]
3434

35-
[lints.rust]
36-
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(published_docs)'] }
35+
# Currently causes "unused manifest key" warnings. Maybe re-enable in the future, to make `published_docs` known.
36+
#[lints.rust]
37+
#unexpected_cfgs = { level = "warn", check-cfg = ['cfg(published_docs)'] }

godot/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,6 @@ godot-macros = { path = "../godot-macros" }
3535
features = ["experimental-godot-api"]
3636
rustdoc-args = ["--cfg", "published_docs"]
3737

38-
[lints.rust]
39-
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(published_docs)'] }
38+
# Currently causes "unused manifest key" warnings. Maybe re-enable in the future, to make `published_docs` known.
39+
#[lints.rust]
40+
#unexpected_cfgs = { level = "warn", check-cfg = ['cfg(published_docs)'] }

0 commit comments

Comments
 (0)