Closed

Description
In libstd/sys/unix there are numerous cases where return code is checked for
error using following pattern:
let result = libc::pthread_mutexattr_init(&mut attr as *mut _);
debug_assert_eq!(result, 0);
That means, that error checking is performed only when compiled in
non-optimized mode or after explicitly enabling debug assertions. This is a
little bit worrying, especially when used on platforms where those functions
can indeed fail and break safety.