Conversation
dvdplm
left a comment
There was a problem hiding this comment.
(Although I don't think try! is deprecated, is it? Not recommended for sure, but does it print a warning?)
my bad, the warnings appear only on the nightly toolchain |
|
Does it affect generated code? |
|
@niklasad1 can you rebase please? :) |
The binaries are not identical but I benched the following: pub fn try_operator(a: Result<usize, usize>) -> Result<usize, usize> {
Ok(a?)
}
pub fn try_macro(a: Result<usize, usize>) -> Result<usize, usize> {
Ok(r#try!(a))
}
|
The problem was with more complex (nested) expressions and the compiler not being able to optimize the overhead away. I think it's fine in our case. |
No description provided.