I have a small suggestion regarding the error message for the ? operator. Right now for a function like this
fn func1() {
let v = func2()?;
< code continues here>
}
The error message is:
error[E0277]: the trait bound `(): std::ops::Carrier` is not satisfied
[...]
| -------------------------
| |
| the trait `std::ops::Carrier` is not implemented for `()`
| in this macro invocation
I think is not clear for a newbie that this refers to the return type of the func1 and not func2. Maybe it would be good to clarify the error message. It would be enough to say
error[E0277]: the trait bound `(): std::ops::Carrier` is not satisfied
[...]
| -------------------------
| |
| the trait `std::ops::Carrier` is not implemented for `() ` (func1 return type)
| in this macro invocation
or something similar.