Created
October 1, 2014 13:06
-
-
Save bstrie/a4587f2df20b6192d8a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<std macros>:2:59: 2:65 error: mismatched types: expected `()`, found `core::result::Result<<generic #9>,()>` (expected (), found enum core::result::Result) | |
<std macros>:2 ($e:expr) => (match $e { Ok(e) => e, Err(e) => return Err(e) }) | |
^~~~~~ | |
<std macros>:1:1: 3:2 note: in expansion of try! | |
try.rs:2:13: 2:25 note: expansion site |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
let x = try!(foo()); | |
} | |
fn foo() -> Result<(), ()> { | |
Ok(()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment