Closed acheroncrypto closed 1 month ago
There is a new #[cfg] related lint with Rust 1.80 (nightly-2024-05-05):
#[cfg]
warning: unexpected `cfg` condition name: `procmacro2_semver_exempt` --> ~/anchor/lang/syn/src/idl/defined.rs:493:19 | 493 | #[cfg(procmacro2_semver_exempt)] | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows` = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(procmacro2_semver_exempt)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default
See https://blog.rust-lang.org/2024/05/06/check-cfg.html
Allow #[cfg(procmacro2_semver_exempt)] in Cargo.toml's [lints.rust.unexpected_cfgs] section. This #[cfg] is necessary for resolving external types with the help of proc-macro2 crate.
#[cfg(procmacro2_semver_exempt)]
Cargo.toml
[lints.rust.unexpected_cfgs]
proc-macro2
@acheroncrypto is attempting to deploy a commit to the coral-xyz Team on Vercel.
A member of the Team first needs to authorize it.
Problem
There is a new
#[cfg]
related lint with Rust 1.80 (nightly-2024-05-05):See https://blog.rust-lang.org/2024/05/06/check-cfg.html
Summary of changes
Allow
#[cfg(procmacro2_semver_exempt)]
inCargo.toml
's[lints.rust.unexpected_cfgs]
section. This#[cfg]
is necessary for resolving external types with the help ofproc-macro2
crate.