On =nightly= Rust versions, values of type ~GHOST_TSuccess~ can be propagated directly with ~?~, but on stable they must be propagated through ~GhostResult~:
fn try_things_internal() -> GhostResult // On nightly, we can propagage `GHOST_TSuccess` directly here, but it's still more desireable for us to have a `Result<T,E>` instead of an integer in Rust, so this is still preferrable.
fn try_things_internal() -> GhostResult // On nightly, we can propagage `GHOST_TSuccess` directly here, but it's still more desireable for us to have a `Result<T,E>` instead of an integer in Rust, so this is still preferrable.
{
unsafe {
eturns_tsuccess()?;
}
Ok(())
}
fn caller()
{
match try_things_internal() {
Ok(_) => println!("Yay!"),
Err(_) => panic!("Fug"),
}
}
#+END_SRC
Keeping such a style is /usually/ preferred, anyhow.