You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I compile sdl2-sys crate with the latest stable Rust, I get this kind of error message:
warning: unexpected `cfg` condition name: `ios_framework`
--> sdl2-sys\build.rs:340:46
|
340 | let use_framework = cfg!(any(ios_framework, feature = "use_ios_framework"));
| ^^^^^^^^^^^^^
|
= 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(ios_framework)'] }
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
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: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition name: `ios_framework`
--> sdl2-sys\build.rs:340:46
|
340 | let use_framework = cfg!(any(ios_framework, feature = "use_ios_framework"));
| ^^^^^^^^^^^^^
|
= 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(ios_framework)'] }
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `mac_framework`
--> sdl2-sys\build.rs:357:46
|
357 | let use_framework = cfg!(any(mac_framework, feature = "use_mac_framework"));
| ^^^^^^^^^^^^^
|
= 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: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `ios_framework`
--> sdl2-sys\build.rs:364:46
|
364 | let use_framework = cfg!(any(ios_framework, feature = "use_ios_framework"));
| ^^^^^^^^^^^^^
|
= 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(ios_framework)'] }
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `mac_framework`
--> sdl2-sys\build.rs:381:46
|
381 | let use_framework = cfg!(any(mac_framework, feature = "use_mac_framework"));
| ^^^^^^^^^^^^^
|
= 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: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `ios_framework`
--> sdl2-sys\build.rs:388:46
|
388 | let use_framework = cfg!(any(ios_framework, feature = "use_ios_framework"));
| ^^^^^^^^^^^^^
|
= 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(ios_framework)'] }
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `mac_framework`
--> sdl2-sys\build.rs:405:46
|
405 | let use_framework = cfg!(any(mac_framework, feature = "use_mac_framework"));
| ^^^^^^^^^^^^^
|
= 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: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `ios_framework`
--> sdl2-sys\build.rs:412:46
|
412 | let use_framework = cfg!(any(ios_framework, feature = "use_ios_framework"));
| ^^^^^^^^^^^^^
|
= 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(ios_framework)'] }
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
warning: `sdl2-sys` (build script) generated 8 warnings
Is there any reason of using a custom cfg attributes, ios_framework and mac_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 b3ee9b2)
The text was updated successfully, but these errors were encountered:
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
Is 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 b3ee9b2)The text was updated successfully, but these errors were encountered: