Răsfoiți Sursa

idl: Fix `unexpected_cfgs` build warning (#2992)

acheron 1 an în urmă
părinte
comite
700cedd519
2 a modificat fișierele cu 5 adăugiri și 0 ștergeri
  1. 1 0
      CHANGELOG.md
  2. 4 0
      lang/syn/Cargo.toml

+ 1 - 0
CHANGELOG.md

@@ -35,6 +35,7 @@ The minor version will be incremented upon a breaking change and the patch versi
 - lang: Fix using optional accounts with `declare_program!` ([#2967](https://github.com/coral-xyz/anchor/pull/2967)).
 - lang: Fix instruction return type generation with `declare_program!` ([#2977](https://github.com/coral-xyz/anchor/pull/2977)).
 - cli: Fix IDL write getting corrupted from retries ([#2964](https://github.com/coral-xyz/anchor/pull/2964)).
+- idl: Fix `unexpected_cfgs` build warning ([#2992](https://github.com/coral-xyz/anchor/pull/2992)).
 
 ### Breaking
 

+ 4 - 0
lang/syn/Cargo.toml

@@ -35,3 +35,7 @@ thiserror = "1"
 
 # `idl-build` feature only
 cargo_toml = { version = "0.19", optional = true }
+
+# https://blog.rust-lang.org/2024/05/06/check-cfg.html#expecting-custom-cfgs
+[lints.rust]
+unexpected_cfgs = { level = "allow", check-cfg = ["cfg(procmacro2_semver_exempt)"] }