On =nightly= Rust versions, values of type ~GHOST_TSuccess~ can be propagated directly with ~?~, but on stable they must be propagated through ~GhostResult~:
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.
{
{
returns_tsuccess()?;
unsafe {
eturns_tsuccess()?;
Ok(())
}
}
Ok(())
fn caller()
}
{
match try_things_internal() {
fn caller()
Ok(_) => println!("Yay!"),
{
Err(_) => panic!("Fug"),
match try_things_internal() {
}
Ok(_) => println!("Yay!"),
}
Err(_) => panic!("Fug"),
}
}
#+END_SRC
#+END_SRC
Keeping such a style is /usually/ preferred, anyhow.
Keeping such a style is /usually/ preferred, anyhow.