Ensure assert_fail and abort have noreturn attribute
This commit is contained in:
@@ -7,3 +7,6 @@ cpp_compat = true
|
||||
|
||||
[enum]
|
||||
prefix_with_name = true
|
||||
|
||||
[fn]
|
||||
no_return = "__attribute__((noreturn))"
|
||||
|
||||
@@ -12,7 +12,7 @@ pub unsafe extern "C" fn __assert_fail(
|
||||
file: *const c_char,
|
||||
line: c_int,
|
||||
cond: *const c_char,
|
||||
) {
|
||||
) -> ! {
|
||||
let func = CStr::from_ptr(func).to_str().unwrap();
|
||||
let file = CStr::from_ptr(file).to_str().unwrap();
|
||||
let cond = CStr::from_ptr(cond).to_str().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user