mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-26 14:49:07 -04:00
chore: explicitly use cfg_aliases 0.2.1
This correctly handles recent nightly lint that requires to explicitly define the CFG guards.
This commit is contained in:
@@ -71,7 +71,7 @@ rwh_05 = ["dep:rwh_05", "ndk/rwh_05"]
|
||||
rwh_06 = ["dep:rwh_06", "ndk/rwh_06"]
|
||||
|
||||
[build-dependencies]
|
||||
cfg_aliases = "0.2.0"
|
||||
cfg_aliases = "0.2.1"
|
||||
|
||||
[dependencies]
|
||||
bitflags = "2"
|
||||
|
||||
18
build.rs
18
build.rs
@@ -1,10 +1,10 @@
|
||||
use cfg_aliases::cfg_aliases;
|
||||
|
||||
fn main() {
|
||||
// The script doesn't depend on our code
|
||||
// The script doesn't depend on our code.
|
||||
println!("cargo:rerun-if-changed=build.rs");
|
||||
|
||||
// Setup cfg aliases
|
||||
// Setup cfg aliases.
|
||||
cfg_aliases! {
|
||||
// Systems.
|
||||
android_platform: { target_os = "android" },
|
||||
@@ -22,18 +22,6 @@ fn main() {
|
||||
orbital_platform: { redox },
|
||||
}
|
||||
|
||||
println!("cargo:rustc-check-cfg=cfg(android_platform)");
|
||||
println!("cargo:rustc-check-cfg=cfg(web_platform)");
|
||||
println!("cargo:rustc-check-cfg=cfg(macos_platform)");
|
||||
println!("cargo:rustc-check-cfg=cfg(ios_platform)");
|
||||
println!("cargo:rustc-check-cfg=cfg(windows_platform)");
|
||||
println!("cargo:rustc-check-cfg=cfg(apple)");
|
||||
println!("cargo:rustc-check-cfg=cfg(free_unix)");
|
||||
println!("cargo:rustc-check-cfg=cfg(redox)");
|
||||
|
||||
println!("cargo:rustc-check-cfg=cfg(x11_platform)");
|
||||
println!("cargo:rustc-check-cfg=cfg(wayland_platform)");
|
||||
println!("cargo:rustc-check-cfg=cfg(orbital_platform)");
|
||||
|
||||
// Winit defined cfgs.
|
||||
println!("cargo:rustc-check-cfg=cfg(unreleased_changelogs)");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user