Skip to content

Commit f4211eb

Browse files
committed
fix: bindgen error reporting.
1 parent 5c466a1 commit f4211eb

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

Diff for: hal/stm32l4

Diff for: kernel/build.rs

+4-7
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,10 @@ fn main() {
3838
.generate();
3939

4040
match bindings {
41-
Ok(bindings) => {
42-
bindings.write_to_file("include/kernel/lib.h");
43-
}
44-
Err(e) => {
45-
panic!("Error generating bindings: {}", e);
46-
}
47-
}
41+
Ok(bindings) => bindings.write_to_file("include/kernel/lib.h"),
42+
Err(cbindgen::Error::ParseSyntaxError { .. }) => return, // ignore in favor of cargo's syntax check
43+
Err(err) => panic!("{:?}", err),
44+
};
4845

4946
generate_syscall_map("src").expect("Failed to generate syscall map.");
5047
}

0 commit comments

Comments
 (0)