Skip to content

Instantly share code, notes, and snippets.

@bstrie
Created October 1, 2014 13:06
Show Gist options
  • Save bstrie/a4587f2df20b6192d8a1 to your computer and use it in GitHub Desktop.
Save bstrie/a4587f2df20b6192d8a1 to your computer and use it in GitHub Desktop.
<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
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