Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #[no_mangle]
- #[inline(never)]
- pub fn try_op(a: Result<usize, usize>) -> Result<usize, usize> {
- Ok(a?)
- }
- #[no_mangle]
- #[inline(never)]
- pub fn try_macro(a: Result<usize, usize>) -> Result<usize, usize> {
- Ok(try!(a))
- }
- fn main() {
- println!("{:?}", try_op(Ok(1)));
- println!("{:?}", try_macro(Ok(1)));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement