Inference error with `try!`


#1

https://github.com/brson/error-chain/blob/caused-error/examples/inference.rs

The first let _: () line compiles, not the two last (can't infer type for _). I thought the first and two were equivalent?

The trait CausedError is defined here https://github.com/brson/error-chain/blob/caused-error/src/lib.rs#L400-L428.

See https://github.com/brson/error-chain/pull/62 for the full discussion.


#2

The try macro is defined slightly different than your first example
https://doc.rust-lang.org/src/core/up/src/libcore/macros.rs.html#308-315

It’s basically Err(err) => Err(err.into()) instead of e => e.into()