int foo() {
return 6 * 7;
}
generates
pub unsafe extern "C" fn foo() -> ::core::ffi::c_int {
return 6 as ::core::ffi::c_int * 7 as ::core::ffi::c_int;
}
While semantically fine, this code is unidiomatic because it uses return in the final statement. It would be cleaner to use a tail expression instead.
I don't know if any attempts have been made before to implement it. A few CFG related things have an in_tail parameter, so it looks like someone tried before and got part of the way there?