Skip to content

Instantly share code, notes, and snippets.

@shadowmint
Created April 14, 2014 01:51
Show Gist options
  • Save shadowmint/10610400 to your computer and use it in GitHub Desktop.
Save shadowmint/10610400 to your computer and use it in GitHub Desktop.
enum PyrsErr {
InternalErr
}
...
pub fn init() -> Result<*mut Struct_ppyData, PyrsErr> {
unsafe {
return Ok(ppy_init());
}
return Err(InternalErr); // <-- Works fine
}
enum PyrsErr {
InternalErr
}
...
pub fn init() -> Result<*mut Struct_ppyData, PyrsErr> {
unsafe {
return Ok(ppy_init());
}
Err(InternalErr); // <--- See error below
}
pyrs.rs:28:3: 28:19 error: cannot determine a type for this expression: unconstrained type
pyrs.rs:28 Err(InternalErr);
^~~~~~~~~~~~~~~~
error: aborting due to previous error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment