Skip to content

Commit 035ecb5

Browse files
committed
Make have_basepri an expected cfg
Since Rust 1.80 there is automatic compile-time checks for unexpected cfgs. Ensure that `have_basepri` cfg is known by the compiler emitting it in the build.rs.
1 parent 1c5db27 commit 035ecb5

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ For each category, *Added*, *Changed*, *Fixed* add new entries at the top!
1111

1212
### Fixed
1313

14+
- CFG: Make `have_basepri` an expected cfg
15+
1416
### Changed
1517

1618
## [v1.1.4] - 2023-02-26

build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ fn main() {
77
println!("cargo:rustc-cfg=rustc_is_nightly");
88
}
99

10+
// Make `have_basepri` an expected cfg.
11+
println!("cargo::rustc-check-cfg=cfg(have_basepri)");
12+
1013
// These targets all have know support for the BASEPRI register.
1114
if target.starts_with("thumbv7m")
1215
| target.starts_with("thumbv7em")

0 commit comments

Comments
 (0)