Skip to content

Commit f3f85e6

Browse files
authored
Merge pull request #536 from jannic/fix_clippy_warnings
Fix clippy warnings
2 parents 4395bae + 8ab3799 commit f3f85e6

File tree

6 files changed

+19
-0
lines changed

6 files changed

+19
-0
lines changed

.cargo/config .cargo/config.toml

File renamed without changes.
File renamed without changes.

cortex-m-rt/build.rs

+6
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ INCLUDE device.x"#
4242
f
4343
};
4444

45+
println!("cargo:rustc-check-cfg=cfg(armv6m)");
46+
println!("cargo:rustc-check-cfg=cfg(armv7m)");
47+
println!("cargo:rustc-check-cfg=cfg(armv8m)");
48+
println!("cargo:rustc-check-cfg=cfg(cortex_m)");
49+
println!("cargo:rustc-check-cfg=cfg(has_fpu)");
50+
4551
let max_int_handlers = if target.starts_with("thumbv6m-") {
4652
println!("cargo:rustc-cfg=cortex_m");
4753
println!("cargo:rustc-cfg=armv6m");

cortex-m-rt/examples/cfg-static.rs

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#![deny(warnings)]
55
#![no_main]
66
#![no_std]
7+
// This example uses an undefined cfg, `cfg(never)`
8+
#![allow(unexpected_cfgs)]
79

810
extern crate cortex_m_rt as rt;
911
extern crate panic_halt;

cortex-m-semihosting/build.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use std::env;
33
fn main() {
44
let target = env::var("TARGET").unwrap();
55

6+
println!("cargo:rustc-check-cfg=cfg(thumb)");
67
if target.starts_with("thumbv") {
78
println!("cargo:rustc-cfg=thumb");
89
}

cortex-m/build.rs

+10
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ fn main() {
44
let target = env::var("TARGET").unwrap();
55
let host_triple = env::var("HOST").unwrap();
66

7+
println!("cargo:rustc-check-cfg=cfg(armv6m)");
8+
println!("cargo:rustc-check-cfg=cfg(armv7em)");
9+
println!("cargo:rustc-check-cfg=cfg(armv7m)");
10+
println!("cargo:rustc-check-cfg=cfg(armv8m)");
11+
println!("cargo:rustc-check-cfg=cfg(armv8m_base)");
12+
println!("cargo:rustc-check-cfg=cfg(armv8m_main)");
13+
println!("cargo:rustc-check-cfg=cfg(cortex_m)");
14+
println!("cargo:rustc-check-cfg=cfg(has_fpu)");
15+
println!("cargo:rustc-check-cfg=cfg(native)");
16+
717
if host_triple == target {
818
println!("cargo:rustc-cfg=native");
919
}

0 commit comments

Comments
 (0)