From a8703c163f5aa66819f515356530420955374386 Mon Sep 17 00:00:00 2001 From: Techcable Date: Thu, 19 Sep 2024 22:01:41 -0700 Subject: [PATCH] Attempt rust 1.0 compat for ci/verify-check-cfg I can't use rust 1.0 on my computer (M1 Mac), so I am relying on CI to check this. --- ci/verify-check-cfg/Cargo.toml | 2 +- ci/verify-check-cfg/build.rs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ci/verify-check-cfg/Cargo.toml b/ci/verify-check-cfg/Cargo.toml index 7602ccd..2da55fa 100644 --- a/ci/verify-check-cfg/Cargo.toml +++ b/ci/verify-check-cfg/Cargo.toml @@ -3,7 +3,7 @@ name = "autocfg-verify-check-cfg" description = "A dummy crate to verify autocfg is emitting check-cfg directives" version = "0.1.0" -edition = "2021" +edition = "2015" # only for testing publish = false diff --git a/ci/verify-check-cfg/build.rs b/ci/verify-check-cfg/build.rs index 9df82c0..76098b7 100644 --- a/ci/verify-check-cfg/build.rs +++ b/ci/verify-check-cfg/build.rs @@ -1,3 +1,5 @@ +extern crate autocfg; + pub fn main() { let cfg = autocfg::AutoCfg::new().unwrap(); @@ -8,7 +10,7 @@ pub fn main() { // always true cfg.emit_rustc_version(1, 0); // should always be false - cfg.emit_rustc_version(7, u32::MAX as usize); + cfg.emit_rustc_version(7, std::u32::MAX as usize); // always true cfg.emit_has_path("std::vec::Vec");