diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 94605239897..01a9b8363e2 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -85,6 +85,8 @@ jobs: # Need up-to-date compilers for kernels CC: clang CXX: clang++ + # Treat warnings as errors to catch issues early + RUSTFLAGS: "-D warnings" steps: - uses: actions/checkout@v4 # pin the toolchain version to avoid surprises diff --git a/rust/lance-core/src/utils/cpu.rs b/rust/lance-core/src/utils/cpu.rs index 9d65650e729..4e7ab01871d 100644 --- a/rust/lance-core/src/utils/cpu.rs +++ b/rust/lance-core/src/utils/cpu.rs @@ -78,6 +78,8 @@ mod x86 { // EAX=7, ECX=0: Extended Features (includes AVX512) // More info on calling CPUID can be found here (section 1.4) // https://www.intel.com/content/dam/develop/external/us/en/documents/architecture-instruction-set-extensions-programming-reference.pdf + // __cpuid is safe in nightly but unsafe in stable, allow both + #[allow(unused_unsafe)] let ext_cpuid_result = unsafe { __cpuid(7) }; check_flag(ext_cpuid_result.edx as usize, 23) }