|
|
|
|
|
by hedora
30 days ago
|
|
C has what you are asking for, mostly: int foo f() __attribute__((warn_unused_result))
As long as an error condition on the return value causes a crash on use, then it's mostly the same as result. (The main remaining difference being that you do an implicit `.unwrap()` in C, and in things like rust that's an explicit code smell.) |
|