Benign crates 810,503 installs Download

extprim 1.1.0

“Extra primitive types (u128, i128)”

Rust asm! inline assembly macroRust test marker or harness
SHA-256385a3a60e951eab99ee968d5b4995d8599ef80c6787a4c74a9934ef4da7e9b75

Evidence

#[cfg(test)] attribute u128.rs · lines 362–374
362:39… f) -> Self {
363 Self::saturating_add(self, other)
364 }
365}
366
367#[cfg(test)]
368mod add_sub_tests {
369 use u128::{u128, ZERO, ONE, MAX};
370
371 #[test]
372 fn test_add() {
373 assert_eq!(u128::from_parts(23, 12) + u128::from_parts(78, 45),
374 u128::from_part …
Rust asm! inline assembly macro u128.rs · lines 852–861
852:47… {
853 unsafe {
854 let mut result: u128 = ::std::mem::uninitialized();
855 asm!("
856 movq $2, %rax
857 mulq $3
⋯4 lines
Rust array initialized with thirty-nine bytes u128.rs · lines 2178–2184
2178:41… o: 10000000000000000000, hi: 0 };
2179
2180 let mut buffer = [0u8; 39];
2181 let mut buf = FormatBuffer::new(&mut buffer);
2182
2183 let (mid, lo) = div_rem(*self, TEN19);
2184 if m …
Rust transmute bitwise-conversion syntax error.rs · lines 1–36
1use core::num::ParseIntError;
2use core::mem::transmute;
3
4pub fn invalid_digit() -> ParseIntError {
5 unsafe { transmute(1u8) }
6}
7
⋯14 lines
22}
23
24#[cfg(test)]
25mod tests {
26 use error;
27
28 #[test]
29 fn test_local_parse_int_error_to_std() {
30 assert_fmt_eq!("invalid digit found in string", 29, "{}", error::invalid_digit());
⋯6 lines
#[test] attribute format_buffer.rs · lines 41–51
⋯4 lines
45}
46
47#[test]
48fn test_format_buffer() {
49 assert_fmt_eq!("001234", 6, "{:06}", 1234);
50 assert_fmt_eq!("5678", 16, "{}{}{}", 5, 6, 78);
51} …

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.