Open e5f6bd opened 1 month ago
Well, I found my browser has a tab showing #588, so it seems I found this issue but forget to further investigate. So I think this attribute is checked intentionally to support --cfg mac_framework
. Then I think we should specify lints.rust.unexpected_cfgs.check-cfg
as suggested.
When I compile
sdl2-sys
crate with the latest stable Rust, I get this kind of error message:Entire warnings
``` warning: unexpected `cfg` condition name: `mac_framework` --> sdl2-sys\build.rs:333:46 | 333 | let use_framework = cfg!(any(mac_framework, feature = "use_mac_framework")); | ^^^^^^^^^^^^^ | = 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`, and `windows` = help: consider using a Cargo feature instead = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(mac_framework)'] } = note: seeIs there any reason of using a custom
cfg
attributes,ios_framework
andmac_framework
? Or is it just a reminicent of good old code that is never used right now? It seems these attributes started to be used at least before 2017 ... (as in b3ee9b2f04c57cc4c75ba47ebfe052ae950b18f6)