-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathbuild.rs
More file actions
13 lines (13 loc) · 763 Bytes
/
Copy pathbuild.rs
File metadata and controls
13 lines (13 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Declare the `force_bits` cfg that the test workflow sets via
//! `RUSTFLAGS=--cfg force_bits=...` (16/32/64) so the matrix can exercise
//! the alternative `Word` widths. Without this declaration, stable Rust's
//! `unexpected_cfgs` lint (added by default in 1.80) fires on the three
//! `#[cfg(force_bits = "...")]` sites in `src/arch/mod.rs`.
fn main() {
// Single-colon `cargo:` form for portability. The directive itself
// was stabilised in Rust 1.80; older cargo (down to our MSRV) just
// silently ignores unknown `cargo:` directives, which is fine because
// the `unexpected_cfgs` lint they'd suppress doesn't exist at older
// versions either.
println!(r#"cargo:rustc-check-cfg=cfg(force_bits, values("16", "32", "64"))"#);
}