(raw: RetReg<Num>)
| 238 | #[cfg(any(feature = "event", feature = "runtime", feature = "system"))] |
| 239 | #[inline] |
| 240 | pub(in crate::backend) unsafe fn try_decode_error<Num: RetNumber>(raw: RetReg<Num>) -> io::Errno { |
| 241 | debug_assert!(raw.is_in_range(-4095..0)); |
| 242 | |
| 243 | // Tell the optimizer that we know the value is in the error range. |
| 244 | // This helps it avoid unnecessary integer conversions. |
| 245 | #[cfg(core_intrinsics)] |
| 246 | { |
| 247 | core::intrinsics::assume(raw.is_in_range(-4095..0)); |
| 248 | } |
| 249 | |
| 250 | Errno(raw.decode_error_code()) |
| 251 | } |
| 252 | |
| 253 | /// Return the contained `usize` value. |
| 254 | #[cfg(not(debug_assertions))] |
no test coverage detected