SHARE
TWEET

Untitled

a guest Oct 19th, 2019 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #[no_mangle]
  2. #[inline(never)]
  3. pub fn try_op(a: Result<usize, usize>) -> Result<usize, usize> {
  4.     Ok(a?)
  5. }
  6.  
  7. #[no_mangle]
  8. #[inline(never)]
  9. pub fn try_macro(a: Result<usize, usize>) -> Result<usize, usize> {
  10.     Ok(try!(a))
  11. }
  12.  
  13. fn main() {
  14.     println!("{:?}", try_op(Ok(1)));
  15.     println!("{:?}", try_macro(Ok(1)));
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top