use iex::{iex, Outcome}; #[iex] fn identity(a: T) -> Result { Ok(a) } #[iex] fn default() -> Result { Ok(Default::default()) } #[iex] fn drop(_x: T) -> Result<(), ()> { Ok(()) } #[iex] fn drop_apit(_x: impl Send) -> Result<(), ()> { Ok(()) } #[test] fn generics() { assert_eq!(identity(123).into_result(), Ok(123)); assert_eq!(default().into_result(), Ok(0)); assert_eq!(drop(123).into_result(), Ok(())); assert_eq!(drop_apit(123).into_result(), Ok(())); }