Sha256: b3fa96b52a98b2111e845b59974910acb107a6526514c80fc5d9db7eed402682
Contents?: true
Size: 638 Bytes
Versions: 20
Compression:
Stored size: 638 Bytes
Contents
#![allow(clippy::extra_unused_type_parameters)] mod drop; use self::drop::{DetectDrop, Flag}; use anyhow::Error; use std::marker::Unpin; use std::mem; #[test] fn test_error_size() { assert_eq!(mem::size_of::<Error>(), mem::size_of::<usize>()); } #[test] fn test_null_pointer_optimization() { assert_eq!(mem::size_of::<Result<(), Error>>(), mem::size_of::<usize>()); } #[test] fn test_autotraits() { fn assert<E: Unpin + Send + Sync + 'static>() {} assert::<Error>(); } #[test] fn test_drop() { let has_dropped = Flag::new(); drop(Error::new(DetectDrop::new(&has_dropped))); assert!(has_dropped.get()); }
Version data entries
20 entries across 20 versions & 1 rubygems